Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

XmlDoc Interface 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) XmlDoc:
 

Get content of document.

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

- (id) XmlDoc: (id) 
(xmlDocPtr) 
(id)  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 *) XmlDoc:
 

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) XmlDoc:
 

Initialize the XML processing system.

Description
Initialize the XML processing system.

+ (XmlDoc *) XmlDoc: (id) 
(const xmlChar *) 
(id)  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 *) XmlDoc: (id) 
(const char *) 
(id)  fname
doValidate: (id) 
(BOOL) 
(id)  dovalid
doRemoveSpace: (id) 
(BOOL) 
(id)  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 *) XmlDoc:
 

Get root node.

Returns:
Root node.
Description
Get root node.

- (int) XmlDoc:
 

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) XmlDoc: (id) 
(const char *) 
(id)  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) XmlDoc: (id) 
(const char *) 
(id)  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) XmlDoc: (id) 
(const char *) 
(id)  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* XmlDoc::input_file_name [protected]
 

Input file name. This will be null.

char* XmlDoc::output_file_name [protected]
 

Output file name. This will be null.

xmlDocPtr XmlDoc::xml_doc_ptr [protected]
 

document body


The documentation for this interface was generated from the following file:
Generated on Mon Jul 19 20:04:09 2004 for LibXmlKit by doxygen 1.3.6