Overview | Package | Class | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package com.caucho.xml

XML parsing and printing package.

See:
Description

Interface Summary
CauchoDocument | CauchoDocument extends the DOM, providing namespaces
CauchoElement | CauchoElement extends the DOM, providing for ordered Attributes.
CauchoNode | CauchoNode extends the DOM, providing namespace support and input file support.
XMLWriter | Interface for printing XML documents.

Class Summary
AbstractParser |
DOMBuilder | XMLWriter to create a DOM document.
Html | HTML parser interface.
LooseHtml | A forgiving HTML parser interface.
LooseXml | Loose XML parser interface.
NamespaceMap |
QAbstractNode | QAbstractNode is an abstract implementation for any DOM node.
QAttr |
QDocument | Implements the top-level document for the XML tree.
QDocumentType |
QDOMImplementation |
QElement | Resin's implementation of the DOM element.
QEmptyNodeList | QAbstractNode is an abstract implementation for any DOM node.
QName |
QNode | QNode represents any node that can have children.
SAXBuilder | XMLWriter to create a SAX events.
Xml | XML parser interface.
XmlChar | XmlChar contains the XML character classes
XmlParser | A configurable XML parser.
XmlPrinter | Controls printing of XML documents.
XmlUtil | XML utilities for manipulating names and the DOM.

Exception Summary
XmlParseException |

## Package com.caucho.xml Description

XML parsing and printing package.

### Parsing

Applications using strict XML parsing will either use the JAXP API or the SAX API to create their parsers. Applications needing to parse HTML will generally instantiate their own parsers.

There are four parser flavors with the same API: Xml, LooseXml, Html and LooseHtml. The core of the API is in AbstractParser.

- Xml is a strict XML parser.
- LooseXml is a forgiving XML parser.
- Html is a strict HTML parser.
- LooseHtml is a forgiving HTML parser.

  You can parse XML into a DOM tree or you can use the SAX callback API. The core of the API is documented in AbstractParser.

  DOM parsing looks like: ``

      Document doc = new Html().parseDocument("test.html");

  Parsing directly from a string looks like: ``

      String str = "<em>test html doc</em>";
      Document doc = new Html().parseDocumentString(str);

  SAX parsing looks like: ``

      Html html = new Html();
      html.setContentHandler(myContentHandler);
      html.parse("test.html");

  Overview | Package | Class | Tree | Deprecated | Index | Help
  PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES