@Override public void endElement(String namespaceURI, String localName, String qualifiedName) throws SAXException { if (!localName.equals(LINK_ELEMENT_NAME)) { super.endElement(namespaceURI, localName, qualifiedName); } else if (mReplacingElement) { super.endElement(namespaceURI, STYLE_ELEMENT_NAME, STYLE_ELEMENT_NAME); mReplacingElement = false; } }
/** * Checks if ending element is {@code isbn}. * * <p> * * @see org.xml.sax.helpers.XMLFilterImpl#endElement(java.lang.String, java.lang.String, * java.lang.String) */ @Override public void endElement(String uri, String localName, String qName) throws SAXException { if (ISBN_TAG.equalsIgnoreCase(localName)) { workingOnIsbnElement = false; } super.endElement(uri, localName, qName); }
public void endElement(String namespaceUri, String localName, String qname) throws SAXException { --level; // System.out.println(getClass().getName()+".endElement enter " + qname); try { StackContext stackEntry = stack.peek(); SaxEventBufferBuilder bufferBuilder = stackEntry.bufferBuilder; if (bufferBuilder != null) { bufferBuilder.endElement(namespaceUri, localName, qname); if (level == 0) { bufferBuilder.endDocument(); SaxEventBuffer buffer = bufferBuilder.getBuffer(); SaxSource saxSource = new SaxEventBufferSource(buffer, "", context.getTransformerFactory()); DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); builderFactory.setValidating(false); builderFactory.setNamespaceAware(true); DocumentBuilder builder = builderFactory.newDocumentBuilder(); XMLReader reader = saxSource.createXmlReader(); // InputSource inputSource = new InputSource(reader); // Document doc = builder.parse(inputSource); } } stack.pop(); } catch (ServingXmlException e) { throw new SAXException(e.getMessage(), e); } catch (Exception e) { throw new SAXException(e.getMessage(), e); } super.endElement(namespaceUri, localName, qname); // System.out.println(getClass().getName()+".endElement " + qname + " leave"); }
public void endElement(String uri, String localName, String qName) throws SAXException { if (isPruning()) { this.depth--; } else { super.endElement(uri, localName, qName); } }
public void endElement(String namespaceURI, String localName, String qName) throws SAXException { try { charsAdded = false; --indentLevel; if (lastElementClosed) { writePrintln(); indent(); } // XXXX: need to determine this using a stack and checking for // content / children boolean hadContent = true; if (hadContent) { writeClose(qName); } else { writeEmptyElementClose(qName); } lastOutputNodeType = Node.ELEMENT_NODE; lastElementClosed = true; super.endElement(namespaceURI, localName, qName); } catch (IOException e) { handleException(e); } }
/** * Write an end tag. * * <p>If the element has contained other elements, the tag will appear indented on a new line; * otherwise, it will appear immediately following whatever came before. * * <p>The newline and indentation will be passed on down the filter chain through regular * characters events. * * @param uri The element's Namespace URI. * @param localName The element's local name. * @param qName The element's qualified (prefixed) name. * @exception org.xml.sax.SAXException If there is an error writing the end tag, or if a filter * further down the chain raises an exception. * @see XMLWriter#endElement(String, String, String) */ public void endElement(String uri, String localName, String qName) throws SAXException { depth--; if (state == SEEN_ELEMENT) { writeNewLine(); doIndent(); } super.endElement(uri, localName, qName); state = stateStack.pop(); }
/** {@inheritDoc} */ @Override public void endElement(String uri, String localName, String qName) throws SAXException { if (skipProperty) { if ("sv:property".equals(qName)) { skipProperty = false; invalue = false; elementBuffer.clear(); } return; } super.endElement(uri, localName, qName); }
@Override public void endElement(final String uri, final String localName, final String qName) throws SAXException { super.endElement(uri, localName, qName); if (uri != null && uri.equals(XSPEC_NS) && localName.equals("pendingTests")) { pendingWrapper--; } if (uri != null && uri.equals(XSPEC_NS) && localName.equals("scenario") && pendingScenario == true) { pendingWrapper--; pendingScenario = false; } }
/** * Write an end tag. * * <p>Pass the event on down the filter chain for further processing. * * @param uri The Namespace URI, or the empty string if none is available. * @param localName The element's local (unprefixed) name (required). * @param qName The element's qualified (prefixed) name, or the empty string is none is available. * This method will use the qName as a template for generating a prefix if necessary, but it * is not guaranteed to use the same qName. * @exception org.xml.sax.SAXException If there is an error writing the end tag, or if a handler * further down the filter chain raises an exception. * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, * java.lang.String) */ public void endElement(String uri, String localName, String qName) throws SAXException { try { if (startTagIsClosed) { write("</"); write(qName); write('>'); } else { write("/>"); startTagIsClosed = true; } super.endElement(uri, localName, qName); // nsSupport.popContext(); elementLevel--; } catch (IOException e) { throw new SAXException(e); } }
@Override public void endElement(String uri, String localName, String name) throws SAXException { String lower = localName.toLowerCase(); super.endElement(XMLConstants.NULL_NS_URI, lower, lower); }