public void endElement(final String namespaceURI, final String localName, final String qName) throws SAXException { addCdata(); Node oldCurrentNode = stack.pop(); if (oldCurrentNode != null) { currentNode = oldCurrentNode; } }
public void startElement(final String namespaceURI, final String localName, final String qName, final Attributes atts) throws SAXException { addCdata(); final Map<String, String> attributes = new NamespaceAwareHashMap(); final Map<String, String> attributeNamespaces = new HashMap<String, String>(); for (int i = atts.getLength() - 1; i != -1; i--) { if (atts.getURI(i).length() == 0) { attributes.put(atts.getQName(i), atts.getValue(i)); } else { String key = new QName(atts.getURI(i), atts.getLocalName(i)).toString(); attributes.put(key, atts.getValue(i)); attributeNamespaces.put(key, atts.getURI(i)); } } final Node newElement; if (namespaceURI.length() == 0) { newElement = new Node(currentNode, qName, attributes, attributeNamespaces, namespaceURI); } else { newElement = new Node(currentNode, localName, attributes, attributeNamespaces, namespaceURI); } if (currentNode != null) { currentNode.addChild(newElement); } stack.push(currentNode); currentNode = newElement; }
public void endElement(final String namespaceURI, final String localName, final String qName) throws SAXException { addCdata(); Node oldCurrentNode = stack.pop(); if (oldCurrentNode != null) { currentNode = oldCurrentNode; } }
public void endElement(final String namespaceURI, final String localName, final String qName) throws SAXException { addCdata(); Node oldCurrentNode = stack.pop(); if (oldCurrentNode != null) { currentNode = oldCurrentNode; } }
public void endElement(final String namespaceURI, final String localName, final String qName) throws SAXException { addCdata(); final Object oldCurrentNode = this.stack.pop(); if (oldCurrentNode != null) { this.currentNode = (Node)oldCurrentNode; } }
public void endElement(final String namespaceURI, final String localName, final String qName) throws SAXException { addCdata(); final Object oldCurrentNode = this.stack.pop(); if (oldCurrentNode != null) { this.currentNode = (Node)oldCurrentNode; } }
public void endElement(final String namespaceURI, final String localName, final String qName) throws SAXException { addCdata(); final Object oldCurrentNode = this.stack.pop(); if (oldCurrentNode != null) { this.currentNode = (Node)oldCurrentNode; } }
public void startElement(final String namespaceURI, final String localName, final String qName, final Attributes atts) throws SAXException { addCdata();
public void startElement(final String namespaceURI, final String localName, final String qName, final Attributes atts) throws SAXException { addCdata();
public void startElement(final String namespaceURI, final String localName, final String qName, final Attributes atts) throws SAXException { addCdata(); final Map<String, String> attributes = new HashMap<String, String>(); final Map<String, String> attributeNamespaces = new HashMap<String, String>(); for (int i = atts.getLength() - 1; i != -1; i--) { if (atts.getURI(i).length() == 0) { attributes.put(atts.getQName(i), atts.getValue(i)); } else { attributes.put(atts.getLocalName(i), atts.getValue(i)); attributeNamespaces.put(atts.getLocalName(i), atts.getURI(i)); } } final Node newElement; if (namespaceURI.length() == 0) { newElement = new Node(currentNode, qName, attributes, attributeNamespaces, namespaceURI); } else { newElement = new Node(currentNode, localName, attributes, attributeNamespaces, namespaceURI); } if (currentNode != null) { currentNode.addChild(newElement); } stack.push(currentNode); currentNode = newElement; }
public void startElement(final String namespaceURI, final String localName, final String qName, final Attributes atts) throws SAXException { addCdata();
public void startElement(final String namespaceURI, final String localName, final String qName, final Attributes atts) throws SAXException { addCdata(); final Map<String, String> attributes = new NamespaceAwareHashMap(); final Map<String, String> attributeNamespaces = new HashMap<String, String>(); for (int i = atts.getLength() - 1; i != -1; i--) { if (atts.getURI(i).length() == 0) { attributes.put(atts.getQName(i), atts.getValue(i)); } else { String key = new QName(atts.getURI(i), atts.getLocalName(i)).toString(); attributes.put(key, atts.getValue(i)); attributeNamespaces.put(key, atts.getURI(i)); } } final Node newElement; if (namespaceURI.length() == 0) { newElement = new Node(currentNode, qName, attributes, attributeNamespaces, namespaceURI); } else { newElement = new Node(currentNode, localName, attributes, attributeNamespaces, namespaceURI); } if (currentNode != null) { currentNode.addChild(newElement); } stack.push(currentNode); currentNode = newElement; }