org.mortbay.xml
Class XmlParser
java.lang.Object
org.mortbay.xml.XmlParser
public class XmlParser
extends java.lang.Object
XML Parser wrapper. This class wraps any standard JAXP1.1 parser with convieniant error and
entity handlers and a mini dom-like document tree.
By default, the parser is created as a validating parser. This can be changed by setting the
"org.mortbay.xml.XmlParser.NotValidating" system property to true.
$Id: XmlParser.java,v 1.21 2005/10/25 07:53:22 gregwilkins Exp $
XmlParser
public XmlParser()
Construct
XmlParser
public XmlParser(boolean validating)
Constructor.
getXpath
public String getXpath()
parse
public XmlParser.Node parse(File file)
throws IOException,
SAXException
Parse File.
parse
public XmlParser.Node parse(InputSource source)
throws IOException,
SAXException
parse
public XmlParser.Node parse(InputStream in)
throws IOException,
SAXException
Parse InputStream.
parse
public XmlParser.Node parse(String url)
throws IOException,
SAXException
Parse string URL.
parse
public XmlParser.Node parse(URL url)
throws IOException,
SAXException
Parse URL.
redirectEntity
public void redirectEntity(String name,
URL entity)
setXpath
public void setXpath(String xpath)
Set an XPath
A very simple subset of xpath is supported to select a partial
tree. Currently only path like "/node1/nodeA | /node1/nodeB"
are supported.
xpath
- The xpath to set.
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.