XmlDoc Class Reference

Class for XML document. More...

#import <xmldoc.h>

Inheritance diagram for XmlDoc:

XmlObject List of all members.

Public Member Functions

(id) - initXmlDoc:
 Initialize instance of XmlDoc class.
(XmlNode *) - rootNode
 Get root node.
(void) - setInputFileName:
 Set input file name string.
(const char *) - inputFileName
 Get input file name.
(void) - setOutputFileName:
 Set output file name string.
(int) - save
 Save the document into the output file.
(int) - saveFileAs:
 Save the document into the output file.
(xmlDocPtr) - docPtr
 Get content of document.

Static Public Member Functions

(id) + load
 Initialize the XML processing system.
(XmlDoc *) + readFile:doValidate:doRemoveSpace:
 Read XML text file and built data structure for it.
(XmlDoc *) + makeEmptyDoc:
 Make empty XML document.

Protected Attributes

xmlDocPtr xml_doc_ptr
char * input_file_name
char * output_file_name

Detailed Description

Class for XML document.

Description
Class for XML document.


Member Function Documentation

- (xmlDocPtr) docPtr  
 

Get content of document.

Returns:
xmlDocPtr type data.
Description
Get content of document.

- (id) initXmlDoc: (xmlDocPtr)  doc  
 

Initialize instance of XmlDoc class.

Returns:
Generated instance of XmlDoc
Parameters:
doc Source xml data for libxml2.
Description
Initialize instance of XmlDoc class. This method is called in the memory allocation function in libxml2. DO NOT CALL this method directory.

- (const char *) inputFileName  
 

Get input file name.

Returns:
Input file name or null.
Description
Get input file name string. If the name is null, it means the document does not have input file or read from standard input.

+ (id) load  
 

Initialize the XML processing system.

Description
Initialize the XML processing system.

+ (XmlDoc *) makeEmptyDoc: (const xmlChar *)  root  
 

Make empty XML document.

Parameters:
root Root node name. If you pass null pointer, the default name root is used.
Returns:
Generated instance of XmlDoc
Description
Read XML text file and built data structure for it.

+ (XmlDoc *) readFile: (const char *)  fname
doValidate: (BOOL)  dovalid
doRemoveSpace: (BOOL)  doremov
 
 

Read XML text file and built data structure for it.

Returns:
Generated instance of XmlDoc
Parameters:
fname Source file name. If you pass null pointer, standard input is used.
dovalid Validate the document when parse the file or not.
doremov Set true when you want to remove needless spaces from the source XML text.
Description
Read XML text file and built data structure for it. If the parsing is succeeded this method returns non nil value.

- (XmlNode *) rootNode  
 

Get root node.

Returns:
Root node.
Description
Get root node.

- (int) save  
 

Save the document into the output file.

Returns:
Number of writen bytes. If some errors were occured, this value will be negative.
Description
Save the document into the output file.

- (int) saveFileAs: (const char *)  fname  
 

Save the document into the output file.

Returns:
Number of writen bytes. If some errors were occured, this value will be negative.
Parameters:
fname Destination output file name. If you give null pointer, standard output are used.
Description
Save the document into the output file.

- (void) setInputFileName: (const char *)  fname  
 

Set input file name string.

Parameters:
fname Input file name. It will be null.
Description
Set input file name string. If the name is null, it means the document does not have input file or read from standard input.

- (void) setOutputFileName: (const char *)  fname  
 

Set output file name string.

Parameters:
fname Output file name. It will be null.
Description
Set output file name string. If the name is null, it means the document is saved into standard output.


Member Data Documentation

- (char*) input_file_name [protected]
 

Input file name. This will be null.

- (char*) output_file_name [protected]
 

Output file name. This will be null.

- (xmlDocPtr) xml_doc_ptr [protected]
 

document body


The documentation for this class was generated from the following files:
Generated on Fri Feb 3 02:47:29 2006 for LibXmlKit by  doxygen 1.4.5