Element
@Deprecated public class ElementParser extends Object
Element
objects.
Note: This parser is XML Namespaces-aware.
Constructor and Description |
---|
ElementParser()
Deprecated.
Constructs a new
ElementParser . |
Modifier and Type | Method and Description |
---|---|
Element |
parse(File file)
Deprecated.
Parses content of a file to create an XML
Element object. |
Element |
parse(InputStream in)
Deprecated.
Parses content of a character stream to create an XML
Element object. |
Element |
parse(Reader in)
Deprecated.
Parses content of a character stream to create an XML
Element object. |
Element |
parse(String text)
Deprecated.
Parses the specified String to create an XML
Element object. |
public Element parse(String text) throws IllegalArgumentException, ParseException
Element
object.text
- the XML text to be parsed, not null
.null
.IllegalArgumentException
- if text == null
.ParseException
- if the content of the character stream is not considered to be valid XML.public Element parse(InputStream in) throws IllegalArgumentException, IOException, ParseException
Element
object.in
- the byte stream that is supposed to contain XML to be parsed,
not null
.null
.IllegalArgumentException
- if in == null
.IOException
- if there is an I/O error.ParseException
- if the content of the character stream is not considered to be valid
XML.public Element parse(Reader in) throws IllegalArgumentException, IOException, ParseException
Element
object.in
- the character stream that is supposed to contain XML to be parsed,
not null
.null
.IllegalArgumentException
- if in == null
.IOException
- if there is an I/O error.ParseException
- if the content of the character stream is not considered to be valid
XML.public Element parse(File file) throws IllegalArgumentException, IOException, ParseException
Element
object.file
- the file that is supposed to contain XML to be parsed,
not null
.null
.IllegalArgumentException
- if file == null
.IOException
- if there is an I/O error, e.g. the file does not exist or is actually
a directory.ParseException
- if the content of the file is not considered to be valid XML.See http://www.xins.org/.