public class XMLParser extends JaxpParser
Extends the base JaxpParser to properly handle mixed text and subnodes in XHTML content while maintaining both output types. Overrides default parsing behavior to ensure correct handling of text nodes and element separation.
Provides custom output methods that recognize special text nodes and uses empty entities for self-closing tags to prevent malformed HTML output.
| Constructor and Description |
|---|
XMLParser(I2PAppContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
Node |
parse(Node parentNode,
Node domNode,
int rank)
Modified from UPnP JaxpParser
|
static void |
toString(StringBuilder buf,
Node node)
A replacement for Node.toString(), which does not recognize #text.
|
parse, parsepublic static final String TEXT_NAME
public XMLParser(I2PAppContext ctx)
public Node parse(Node parentNode, Node domNode, int rank)
parse in class JaxpParserparentNode - null if at toprank - parse level, only for debugdomNode - the DOM node to parsepublic static void toString(StringBuilder buf, Node node)