/** * Consume elements that have been buffered, like </body></html> that are first consumed * at the end of document */ private void consumeBufferedEndElements() { final List toConsume = new ArrayList(endElementsBuffer_); endElementsBuffer_.clear(); for (int i=0; i<toConsume.size(); ++i) { final ElementEntry entry = (ElementEntry) toConsume.get(i); forcedEndElement_ = true; endElement(entry.name_, entry.augs_); } endElementsBuffer_.clear(); }
/** Empty element. */ public void emptyElement(final QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { startElement(element, attrs, augs); // browser ignore the closing indication for non empty tags like <form .../> but not for unknown element final HTMLElements.Element elem = getElement(element); if (elem.isEmpty() || elem.code == HTMLElements.UNKNOWN) { endElement(element, augs); } } // emptyElement(QName,XMLAttributes,Augmentations)
endElement(fQName, synthesizedAugs()); insertBody = true;
/** * Consume elements that have been buffered, like </body></html> that are first consumed * at the end of document */ private void consumeBufferedEndElements() { final List toConsume = new ArrayList(endElementsBuffer_); endElementsBuffer_.clear(); for (int i=0; i<toConsume.size(); ++i) { final ElementEntry entry = (ElementEntry) toConsume.get(i); forcedEndElement_ = true; endElement(entry.name_, entry.augs_); } endElementsBuffer_.clear(); }
/** * Consume elements that have been buffered, like </body></html> that are first consumed * at the end of document */ private void consumeBufferedEndElements() { final List toConsume = new ArrayList(endElementsBuffer_); endElementsBuffer_.clear(); for (int i=0; i<toConsume.size(); ++i) { final ElementEntry entry = (ElementEntry) toConsume.get(i); forcedEndElement_ = true; endElement(entry.name_, entry.augs_); } endElementsBuffer_.clear(); }
/** * Consume elements that have been buffered, like </body></html> that are first consumed * at the end of document */ private void consumeBufferedEndElements() { final List toConsume = new ArrayList(endElementsBuffer_); endElementsBuffer_.clear(); for (int i=0; i<toConsume.size(); ++i) { final ElementEntry entry = (ElementEntry) toConsume.get(i); forcedEndElement_ = true; endElement(entry.name_, entry.augs_); } endElementsBuffer_.clear(); }
/** * Consume elements that have been buffered, like </body></html> that are first consumed * at the end of document */ private void consumeBufferedEndElements() { final List toConsume = new ArrayList(endElementsBuffer_); endElementsBuffer_.clear(); for (int i=0; i<toConsume.size(); ++i) { final ElementEntry entry = (ElementEntry) toConsume.get(i); forcedEndElement_ = true; endElement(entry.name_, entry.augs_); } endElementsBuffer_.clear(); }
/** * Consume elements that have been buffered, like </body></html> that are first consumed * at the end of document */ private void consumeBufferedEndElements() { final List toConsume = new ArrayList(endElementsBuffer_); endElementsBuffer_.clear(); for (int i=0; i<toConsume.size(); ++i) { final ElementEntry entry = (ElementEntry) toConsume.get(i); forcedEndElement_ = true; endElement(entry.name_, entry.augs_); } endElementsBuffer_.clear(); }
/** * Consume elements that have been buffered, like </body></html> that are first consumed * at the end of document */ private void consumeBufferedEndElements() { final List toConsume = new ArrayList(endElementsBuffer_); endElementsBuffer_.clear(); for (int i=0; i<toConsume.size(); ++i) { final ElementEntry entry = (ElementEntry) toConsume.get(i); forcedEndElement_ = true; endElement(entry.name_, entry.augs_); } endElementsBuffer_.clear(); }
if (elem.code == HTMLElements.P) { forceStartElement(element, emptyAttributes(), synthesizedAugs()); endElement(element, augs);
@Override public void endElement(QName element, Augmentations augs) throws XNIException { if (currentOsmlTag != null && "script".equalsIgnoreCase(element.rawname)) { QName endingTag = currentOsmlTag; currentOsmlTag = null; XMLInputSource scriptSource = new XMLInputSource(null, null, null); scriptSource.setCharacterStream(new StringReader(scriptContent.toString())); scriptContent.setLength(0); // Evaluate the content of the script block immediately scanner.evaluateInputSource(scriptSource); super.endElement(endingTag, augs); } else { super.endElement(element, augs); } }
@Override public void endElement(QName element, Augmentations augs) throws XNIException { if (currentOsmlTag != null && "script".equalsIgnoreCase(element.rawname)) { QName endingTag = currentOsmlTag; currentOsmlTag = null; XMLInputSource scriptSource = new XMLInputSource(null, null, null); scriptSource.setCharacterStream(new StringReader(scriptContent.toString())); scriptContent.setLength(0); // Evaluate the content of the script block immediately scanner.evaluateInputSource(scriptSource); super.endElement(endingTag, augs); } else { super.endElement(element, augs); } }
/** Empty element. */ public void emptyElement(final QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { startElement(element, attrs, augs); // browser ignore the closing indication for non empty tags like <form .../> but not for unknown element final HTMLElements.Element elem = getElement(element); if (elem.isEmpty() || elem.code == HTMLElements.UNKNOWN) { endElement(element, augs); } } // emptyElement(QName,XMLAttributes,Augmentations)
/** Empty element. */ public void emptyElement(final QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { startElement(element, attrs, augs); // browser ignore the closing indication for non empty tags like <form .../> but not for unknown element final HTMLElements.Element elem = getElement(element); if (elem.isEmpty() || elem.code == HTMLElements.UNKNOWN) { endElement(element, augs); } } // emptyElement(QName,XMLAttributes,Augmentations)
/** Empty element. */ public void emptyElement(final QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { startElement(element, attrs, augs); // browser ignore the closing indication for non empty tags like <form .../> but not for unknown element final HTMLElements.Element elem = getElement(element); if (elem.isEmpty() || elem.code == HTMLElements.UNKNOWN) { endElement(element, augs); } } // emptyElement(QName,XMLAttributes,Augmentations)
/** Empty element. */ public void emptyElement(final QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { startElement(element, attrs, augs); // browser ignore the closing indication for non empty tags like <form .../> but not for unknown element final HTMLElements.Element elem = getElement(element); if (elem.isEmpty() || fAllowSelfclosingTags || elem.code == HTMLElements.UNKNOWN || (elem.code == HTMLElements.IFRAME && fAllowSelfclosingIframe)) { endElement(element, augs); } } // emptyElement(QName,XMLAttributes,Augmentations)
/** Empty element. */ public void emptyElement(final QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { startElement(element, attrs, augs); // browser ignore the closing indication for non empty tags like <form .../> but not for unknown element final HTMLElements.Element elem = getElement(element); if (elem.isEmpty() || elem.code == HTMLElements.UNKNOWN) { endElement(element, augs); } } // emptyElement(QName,XMLAttributes,Augmentations)
final QName head = createQName("head"); forceStartElement(head, null, synthesizedAugs()); endElement(head, synthesizedAugs()); endElement(info.qname, synthesizedAugs()); break; endElement(info.qname, synthesizedAugs());
/** Empty element. */ public void emptyElement(final QName element, XMLAttributes attrs, Augmentations augs) throws XNIException { startElement(element, attrs, augs); // browser ignore the closing indication for non empty tags like <form .../> but not for unknown element final HTMLElements.Element elem = getElement(element); if (elem.isEmpty() || elem.code == HTMLElements.UNKNOWN) { endElement(element, augs); } } // emptyElement(QName,XMLAttributes,Augmentations)
endElement(fQName, synthesizedAugs()); insertBody = true;