class treeparser
Implements a treeparser
Description
Parse XML into a tree for maniopulation or fetch values uses XPath.
class attributes
[
NB. Highlighted attributes are static members
]
treeparser()
- Constructor
parseFile()
- Parse an xmlfile into a tree.
parseChunk()
- Parse an xml chunk into a tree.
xpathArray()
- Retrive a string from the tree using XPath.
toString()
- Return the XML tree as a string.
saveToFile()
- Save the parser tree to a file.
validation()
- Should we validate the XML agains the DTD in the DOCTYPE element? .
keep_blanks()
- Make the parser keep all whitespace
pedantic()
- make the parser extra strict.
Functions
function
treeparser
Constructor
Declaration:
native function treeparser( )
function
parseFile
Parse an xmlfile into a tree.
Declaration:
native function parseFile( string filename )
Parameters:
Parameter #1: string
filename
- the XML to parse
function
parseChunk
Parse an xml chunk into a tree.
Declaration:
native function parseChunk( string chunk )
Parameters:
Parameter #1: string
the
- XML string to parse
function
xpathArray
Retrive a string from the tree using XPath.
Declaration:
native function xpathArray( string expr )
Parameters:
Parameter #1: string
the
- XPath expression
Returns:
a string containing the result.
function
toString
Return the XML tree as a string.
Declaration:
native function toString( )
Returns:
a string containing the XML data
function
saveToFile
Save the parser tree to a file.
Declaration:
native function saveToFile( string filename )
Parameters:
Parameter #1: string
the
- name of the file to save to.
Returns:
true on success false on failure
function
validation
Should we validate the XML agains the DTD in the DOCTYPE element? .
Parameters:
Parameter #1: number
bool
- true for validate and false for no validation (default)
function
keep_blanks
Make the parser keep all whitespace
Declaration:
native function keep_blanks( number bool )
Parameters:
Parameter #1: number
bool
- true (default) for yes and false for no
function
pedantic
make the parser extra strict.
Declaration:
native function pedantic( number bool )
Parameters:
Parameter #1: number
bool
- true for yes and false for no (default)
Automatically generated at
8:45pm, Wednesday 08 January 2003
by
feritedoc
.