| java.lang.Object groovy.util.XmlParser
XmlParser | public class XmlParser implements ContentHandler(Code) | | A helper class for parsing XML into a tree of Node instances for
a simple way of processing XML. This parser does not preserve the
XML InfoSet - if thats what you need try using W3C DOM, dom4j, JDOM, XOM etc.
This parser ignores comments and processing instructions and converts the
XML into a Node for each element in the XML with attributes
and child Nodes and Strings. This simple model is sufficient for
most simple use cases of processing XML.
author: James Strachan version: $Revision: 4132 $ |
Method Summary | |
protected void | addTextToNode() | public void | characters(char buffer, int start, int length) | public void | endDocument() | public void | endElement(String namespaceURI, String localName, String qName) | public void | endPrefixMapping(String prefix) | public DTDHandler | getDTDHandler() | public Locator | getDocumentLocator() | protected Object | getElementName(String namespaceURI, String localName, String qName) | public EntityResolver | getEntityResolver() | public ErrorHandler | getErrorHandler() | public boolean | getFeature(String uri) | public Object | getProperty(String uri) | protected XMLReader | getXMLReader() | public void | ignorableWhitespace(char buffer, int start, int len) | public Node | parse(File file) | public Node | parse(InputSource input) Parse the content of the specified input source into a tree of Nodes. | public Node | parse(InputStream input) Parse the content of the specified input stream into a tree of Nodes. | public Node | parse(Reader in) Parse the content of the specified reader into a tree of Nodes. | public Node | parse(String uri) | public Node | parseText(String text) | public void | processingInstruction(String target, String data) | public void | setDTDHandler(DTDHandler dtdHandler) | public void | setDocumentLocator(Locator locator) | public void | setEntityResolver(EntityResolver entityResolver) | public void | setErrorHandler(ErrorHandler errorHandler) | public void | setFeature(String uri, boolean value) | public void | setProperty(String uri, Object value) | public void | skippedEntity(String name) | public void | startDocument() | public void | startElement(String namespaceURI, String localName, String qName, Attributes list) | public void | startPrefixMapping(String prefix, String namespaceURI) |
addTextToNode | protected void addTextToNode()(Code) | | |
characters | public void characters(char buffer, int start, int length) throws SAXException(Code) | | |
ignorableWhitespace | public void ignorableWhitespace(char buffer, int start, int len) throws SAXException(Code) | | |
parse | public Node parse(InputStream input) throws IOException, SAXException(Code) | | Parse the content of the specified input stream into a tree of Nodes.
Note that using this method will not provide the parser with any URI
for which to find DTDs etc
|
parse | public Node parse(Reader in) throws IOException, SAXException(Code) | | Parse the content of the specified reader into a tree of Nodes.
Note that using this method will not provide the parser with any URI
for which to find DTDs etc
|
setDocumentLocator | public void setDocumentLocator(Locator locator)(Code) | | |
|
|