|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
groovy.util.XmlSlurper
public class XmlSlurper
Constructor Summary | |
---|---|
XmlSlurper()
|
|
XmlSlurper(boolean validating,
boolean namespaceAware)
|
|
XmlSlurper(SAXParser parser)
|
|
XmlSlurper(org.xml.sax.XMLReader reader)
|
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
GPathResult |
getDocument()
|
org.xml.sax.DTDHandler |
getDTDHandler()
|
org.xml.sax.EntityResolver |
getEntityResolver()
|
org.xml.sax.ErrorHandler |
getErrorHandler()
|
boolean |
getFeature(java.lang.String uri)
|
java.lang.Object |
getProperty(java.lang.String uri)
|
GPathResult |
parse(java.io.File file)
Parses the content of the given file as XML turning it into a GPathResult object |
GPathResult |
parse(org.xml.sax.InputSource input)
Parse the content of the specified input source into a GPathResult object |
GPathResult |
parse(java.io.InputStream input)
Parse the content of the specified input stream into an GPathResult Object. |
GPathResult |
parse(java.io.Reader in)
Parse the content of the specified reader into a GPathResult Object. |
GPathResult |
parse(java.lang.String uri)
Parse the content of the specified URI into a GPathResult Object |
GPathResult |
parseText(java.lang.String text)
A helper method to parse the given text as XML |
void |
setDTDHandler(org.xml.sax.DTDHandler dtdHandler)
|
void |
setEntityBaseUrl(java.net.URL base)
Resolves entities against using the suppied URL as the base for relative URLs |
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
|
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
|
void |
setFeature(java.lang.String uri,
boolean value)
|
void |
setKeepWhitespace(boolean keepWhitespace)
|
void |
setProperty(java.lang.String uri,
java.lang.Object value)
|
void |
startDocument()
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
void |
startPrefixMapping(java.lang.String tag,
java.lang.String uri)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlSlurper() throws ParserConfigurationException, org.xml.sax.SAXException
ParserConfigurationException
org.xml.sax.SAXException
public XmlSlurper(boolean validating, boolean namespaceAware) throws ParserConfigurationException, org.xml.sax.SAXException
ParserConfigurationException
org.xml.sax.SAXException
public XmlSlurper(org.xml.sax.XMLReader reader)
public XmlSlurper(SAXParser parser) throws org.xml.sax.SAXException
org.xml.sax.SAXException
Method Detail |
---|
public void setKeepWhitespace(boolean keepWhitespace)
keepWhitespace
- If true then whitespace before elements is kept.
The deafult is to discard the whitespace.public GPathResult getDocument()
public GPathResult parse(org.xml.sax.InputSource input) throws java.io.IOException, org.xml.sax.SAXException
input
-
java.io.IOException
org.xml.sax.SAXException
public GPathResult parse(java.io.File file) throws java.io.IOException, org.xml.sax.SAXException
file
-
java.io.IOException
org.xml.sax.SAXException
public GPathResult parse(java.io.InputStream input) throws java.io.IOException, org.xml.sax.SAXException
input
-
java.io.IOException
org.xml.sax.SAXException
public GPathResult parse(java.io.Reader in) throws java.io.IOException, org.xml.sax.SAXException
in
-
java.io.IOException
org.xml.sax.SAXException
public GPathResult parse(java.lang.String uri) throws java.io.IOException, org.xml.sax.SAXException
uri
-
java.io.IOException
org.xml.sax.SAXException
public GPathResult parseText(java.lang.String text) throws java.io.IOException, org.xml.sax.SAXException
text
-
java.io.IOException
org.xml.sax.SAXException
public org.xml.sax.DTDHandler getDTDHandler()
public org.xml.sax.EntityResolver getEntityResolver()
public org.xml.sax.ErrorHandler getErrorHandler()
public boolean getFeature(java.lang.String uri) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public java.lang.Object getProperty(java.lang.String uri) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setDTDHandler(org.xml.sax.DTDHandler dtdHandler)
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
public void setEntityBaseUrl(java.net.URL base)
base
- The URL used to resolve relative URLspublic void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
public void setFeature(java.lang.String uri, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setProperty(java.lang.String uri, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String tag, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
|
Copyright © 2003-2008 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |