Class TXmlParser
Instances of TXmlParser are used to parse XML files.
The interface for this class is similar to the SAX API by W3C.
characters aString
Called at the start of a block of text.
|
constructor [javaClassName]
Initializes the object and optionally specifies the XML parser to
be used internally.
|
endDocument
Called at the end of processing of the XML file.
|
endElement tagName
Called at the end of an element.
|
parse xmlFile
parse inputStream
Parses a XML document.
|
processingInstruction target data
Called for every processing instruction in the XML file.
|
setHandler obj
Specifies the object responsible for handling the parsing events.
|
setNativeParser javaClassName
Specifies the XML parser to be used internally.
|
startDocument
Called at the start of processing of the XML file.
|
startElement tagName attributes
Called at the start of an element.
|
|
characters
TXmlParser characters aString
Called at the start of a block of text.
- Parameters:
- aString -
String representing the block of text found on the XML document.
-
constructor
TXmlParser constructor [javaClassName]
Initializes the object and optionally specifies the XML parser to
be used internally.
- Parameters:
- javaClassName -
Name of a Java class that must implement the
org.xml.sax.Parser interface.
-
endDocument
TXmlParser endDocument
Called at the end of processing of the XML file.
-
endElement
TXmlParser endElement tagName
Called at the end of an element.
- Parameters:
- tagName -
String representing the name of the element being processed.
-
parse
TXmlParser parse xmlFile
TXmlParser parse inputStream
Parses a XML document.
- Parameters:
- xmlFile -
String representing the name of the file to process.
- inputStream -
A TInput with the XML document contents to be
read.
-
Parses a XML file by reading from a file or input stream.
processingInstruction
TXmlParser processingInstruction target data
Called for every processing instruction in the XML file.
- Parameters:
- target -
String representing the processing instruction target.
- data -
A string representing the data associated with the processing
instruction or the null object if no data was specified.
-
setHandler
TXmlParser setHandler obj
Specifies the object responsible for handling the parsing events.
- Parameters:
- obj -
The object responsible for handling the parsing events.
-
The obj must respond to the following methods:
characters, endDocument
endElement, processingInstruction,
startDocument, startElement.
By default the handler of parsing events is the parser object
itself.
setNativeParser
TXmlParser setNativeParser javaClassName
Specifies the XML parser to be used internally.
- Parameters:
- javaClassName -
Name of a Java class that must implement the
org.xml.sax.Parser interface.
-
A new instance of javaClassName will be created
for each call to the parse method.
startDocument
TXmlParser startDocument
Called at the start of processing of the XML file.
-
startElement
TXmlParser startElement tagName attributes
Called at the start of an element.
- Parameters:
- tagName -
String representing the name of the element being processed.
- attributes -
A THashtable containing the attributes of the element
being processed. The THashtable keys are strings
representing the attributes
names and the values are strings representing
the values of the attributes.
-
Report a bug or request new features
© 2002