- Inherits from:
- DTree
- Conforms to:
- DXMLHandler
- Declared in:
- DXML.h
Object
|
+---DTree
|
+---DXMLTree
Class Description
The XML Tree class implements methods for reading, storing, changing,
removing and writing xml information. Due to the fact that every xml
piece of information is stored in a xml node, large xml files can take
a lot of memory. Unparsed information is not stored in the tree. Use
a character that can't be part of an URI e.g. '|' for the namespace
separator.
- Last modified:
- 31-Oct-2007 (DXML.h)
Instance Variables
- private DTreeIterator *_iter
- the iterator in the xml tree
- private BOOL _inCData
- CDATA section entered ?
- private char _separator
- the namespace separator (or EOS for no namespaces)
- Constructors
- - (DXMLTree *) init
- Initialise a config tree
- Returns:
- the object
- - (DXMLTree *) init :(id <DTextReadable>) source :(const char *) name :(char) separator
- Initialise a xml tree with a xml source
- Parameters:
- source - the xml source
filename - the name of the xml source
separator - the namespace separator (or EOS for no namespaces)
- Returns:
- the object
- Copy constructor
- - shallowCopy
- Do a shallow copy of the object
- Returns:
- the object
- Deconstructor
- - free
- Free the object (including the stored objects)
- Returns:
- the object
- - shallowFree
- Free the object (without the stored objects)
- Returns:
- the object
- Xml tree reading and writing
- - (BOOL) read :(id <DTextReadable>) source :(const char *) name :(char) separator
- Read the xml from a source
- Parameters:
- source - the source of the xml
name - the name of the source
separtor - the namespace separator (or EOS for no namespaces)
- Returns:
- success
- - (BOOL) write :(id <DTextWritable>) destination :(const char *) name
- Write the xml to a destination
- Parameters:
- destination - the destination of the xml
name - the name of the destination (not used)
- Returns:
- success
- Call back methods for the xml parser (private)
- - (BOOL) attribute :(const DXMLChar *) attribute :(const DXMLChar *) value
- Process an attribute for an element (after a startElement)
- Parameters:
- attribute - the attribute
value - the value for the attribute
- Returns:
- success
- - (BOOL) characters :(const DXMLChar *) text
- Process a string of characters
- Parameters:
- text - the text of the characters
- Returns:
- success
- - (BOOL) comment :(const DXMLChar *) text
- Process a comment
- Parameters:
- text - the text of the comment
- Returns:
- success
- - (BOOL) endCDATA
- Process the end of a CDATA section
- Returns:
- success
- - (BOOL) endDocument
- Process the end of a document
- Returns:
- success
- - (BOOL) endElement
- Process the end of an element
- Returns:
- success
- - (BOOL) endNamespace
- End of a namespace declaration
- Returns:
- success
- - (void) error :(int) number :(const char *) name :(int) lineNumber :(int) columnNumber
- An error is found during the parsing of the file
- Parameters:
- number - the error number
name - the name of the config file
lineNumber - the line number in the config file
columnNumber - the column number in the config file
- Returns:
- success
- - (BOOL) processingInstruction :(const DXMLChar *) target :(const DXMLChar *) value
- Process a processing instruction
- Parameters:
- target - the target
value - the value
- Returns:
- success
- - (BOOL) startCDATA
- Process the start of a CDATA section
- Returns:
- success
- - (BOOL) startDocument :(const DXMLChar *) version :(const DXMLChar *) encoding :(int) standalone
- Process the start of a document
- Parameters:
- version - the version number
encoding - the encoding
standalone - is the xml document standalone ? (-1 = missing)
- Returns:
- success
- - (BOOL) startElement :(const DXMLChar *) name
- Process the start of an element
- Parameters:
- name - the name of the element
- Returns:
- success
- - (BOOL) startNamespace :(const DXMLChar *) prefix :(const DXMLChar *) uri
- Start of a namespace declaration
- Parameters:
- prefix - the prefix
uri - the uri
- Returns:
- success
- - (BOOL) unparsed :(const DXMLChar *) text
- Process unparsed text in the xml document (e.g. the DTD)
- Parameters:
- text - the unparsed text
- Returns:
- success
generated 05-Nov-2007 by ObjcDoc 3.0.0