com.caucho.xml
Class XmlParser
java.lang.Object
|
+--com.caucho.xml.XmlParser
- Direct Known Subclasses:
- Html, LooseHtml, LooseXml, Xml
- public class XmlParser
- extends java.lang.Object
- implements org.xml.sax.Parser, org.xml.sax.Locator
A configurable XML parser. Loose versions of XML and HTML are supported
by changing the Policy object.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
XmlParser
public XmlParser()
setEntitiesAsText
public void setEntitiesAsText(boolean entitiesAsText)
setExpandEntities
public void setExpandEntities(boolean expandEntities)
setAutodetectXml
public void setAutodetectXml(boolean autodetectXml)
setEntityResolver
public void setEntityResolver(org.xml.sax.EntityResolver resolver)
- Specified by:
- setEntityResolver in interface org.xml.sax.Parser
setDTDHandler
public void setDTDHandler(org.xml.sax.DTDHandler handler)
- Specified by:
- setDTDHandler in interface org.xml.sax.Parser
setDocumentHandler
public void setDocumentHandler(org.xml.sax.DocumentHandler handler)
- Specified by:
- setDocumentHandler in interface org.xml.sax.Parser
setErrorHandler
public void setErrorHandler(org.xml.sax.ErrorHandler handler)
- Specified by:
- setErrorHandler in interface org.xml.sax.Parser
setLocale
public void setLocale(java.util.Locale locale)
- Specified by:
- setLocale in interface org.xml.sax.Parser
getDocument
public Document getDocument()
parse
public void parse(org.xml.sax.InputSource source)
throws java.io.IOException
- Specified by:
- parse in interface org.xml.sax.Parser
parse
public void parse(java.lang.String systemId)
throws java.io.IOException,
org.xml.sax.SAXException
- Specified by:
- parse in interface org.xml.sax.Parser
parse
public Document parse(Path path)
throws java.io.IOException
parse
public Document parse(java.io.InputStream is)
throws java.io.IOException
parse
public Document parse(ReadStream is)
throws java.io.IOException
parseInt
public Document parseInt(ReadStream is)
throws java.io.IOException,
org.xml.sax.SAXException
- Parse the document from a read stream.
- Parameters:
is
- read stream to parse from.- Returns:
- The parsed document.
getPublicId
public java.lang.String getPublicId()
- Specified by:
- getPublicId in interface org.xml.sax.Locator
getSystemId
public java.lang.String getSystemId()
- Specified by:
- getSystemId in interface org.xml.sax.Locator
getLineNumber
public int getLineNumber()
- Specified by:
- getLineNumber in interface org.xml.sax.Locator
getColumnNumber
public int getColumnNumber()
- Specified by:
- getColumnNumber in interface org.xml.sax.Locator