public class LooseXml extends XmlParser
Loose XML is forgiving for some common lazy cases, e.g. the following is allowed in LooseXml, but not XML
<elt attr=1/>
Also, Loose XML adds a convenient shortcut that's standard SGML but
not XML.
<foo/any text/>
is equivalent to
<foo>any text</foo>
To parse a file into a DOM Document use
Document doc = new LooseXml().parseDocument("foo.xml");
To parse a string into a DOM Document use
String xml = "<top>small test</top>";
Document doc = new LooseXml().parseDocumentString(xml);
To parse a file using the SAX API use
LooseXml xml = new LooseXml();
xml.setContentHandler(myContentHandler);
xml.parse("foo.xml");
XmlParser.LocatorImpl
Constructor and Description |
---|
LooseXml()
Create a new LooseXml parser.
|
free, getColumnNumber, getFilename, getLine, getLineNumber, getPublicId, getSystemId, pushNamespace, setLine, setReader, unread
getContentHandler, getDefaultEncoding, getDTDHandler, getEncoding, getEntitiesAsText, getEntityResolver, getErrorHandler, getFeature, getForgiving, getJsp, getProperty, getResinInclude, getSearchPath, getSkipComments, isCoalescing, isDtdValidating, isNamespaceAware, isNamespacePrefixes, isSAXNamespaces, isValidating, openSource, openStream, openStream, openStream, openTopStream, parse, parse, parse, parse, parse, parseDocument, parseDocument, parseDocument, parseDocument, parseDocument, parseDocument, parseDocumentString, parseImpl, parseString, setAutodetectXml, setCoalescing, setConfig, setContentHandler, setDefaultEncoding, setDocumentHandler, setDTDHandler, setDtdValidating, setEntitiesAsText, setEntityResolver, setErrorHandler, setExpandEntities, setFeature, setFilename, setForgiving, setJsp, setLexicalHandler, setLocale, setNamespaceAware, setNamespacePrefixes, setOwner, setProperty, setResinInclude, setSAXNamespaces, setSearchPath, setSkipComments, setSkipWhitespace, setToLower, setValidating