Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

KXml.h File Reference

XML structure. More...

#include "ktypes.h"
#include "KString.h"

Data Structures

struct  _KXml
 XML structure. More...

Typedefs

typedef _KXml KXml
 XML structure.

Functions

KTL_API KXmlKXml_create (KString header, KCString field)
 Creates an XML structure.
KTL_API void KXml_deleteRec (KXml **xo)
 Deletes recursively an XML structure and all its childs.
KTL_API KInt KXml_addSubObject (KXml *xo, KXml *subxo)
 Adds a sub element to an XML structure.
KTL_API void KXml_print (KXml *xo)
 Displays an XML structure on the standard output. Used only in debug mode.
KTL_API KString KXml_getValue (KXml *xml, KString key)
 Gets the value of a key.
KTL_API KString k_createBeginXmlFlag (KString text)
 Creates the flag of beginning of a key.
KTL_API KString k_createEndXmlFlag (KString text)
 Creates the flag of end of a key.
KTL_API KXmlk_stringToXml (KString xmlString)
 Converts a string in XML format.
KTL_API KString k_xmlToString (KXml *xml)
 Converts an XML structure to a string.
KTL_API KString k_findValueInXmlFile (KString xmlfilepath, KString key)
 Gets the value of a key in an XML file. The file is opened in read mode and the key is searched.
KTL_API KXmlk_fromXmlFile (KString xmlfilepath)
 Creates an XML structure from an XML file.


Detailed Description

XML structure.

Version:
KToolLib-1.0
Author:
Fabien Gallot
Date:
12/11/2008
Note:
Copyright © 2008-2010 iKlax Media SAS (www.iklaxmedia.com). All rights reserved.

Function Documentation

KTL_API KString k_createBeginXmlFlag KString  text  ) 
 

Creates the flag of beginning of a key.

Parameters:
text ??
Returns:
??

KTL_API KString k_createEndXmlFlag KString  text  ) 
 

Creates the flag of end of a key.

Parameters:
text ??
Returns:
??

KTL_API KString k_findValueInXmlFile KString  xmlfilepath,
KString  key
 

Gets the value of a key in an XML file. The file is opened in read mode and the key is searched.

Parameters:
xmlfilepath the path of the XML file
key the key to be searched
Returns:
the value of the key if successful otherwise knull

KTL_API KXml* k_fromXmlFile KString  xmlfilepath  ) 
 

Creates an XML structure from an XML file.

Parameters:
xmlfilepath the path of the XML file
Returns:
the pointer to the created XML structure if successful otherwise knull

KTL_API KXml* k_stringToXml KString  xmlString  ) 
 

Converts a string in XML format.

Parameters:
xmlString the string to be converted
Returns:
the pointer to the converted XML structure if successful otherwise knull

KTL_API KString k_xmlToString KXml xml  ) 
 

Converts an XML structure to a string.

Parameters:
xml the pointer to the XML structure to be converted
Returns:
the converted string if successful otherwise knull

KTL_API KInt KXml_addSubObject KXml xo,
KXml subxo
 

Adds a sub element to an XML structure.

Parameters:
xo the pointer to the XML structure to be completed
subxo the pointer to the sub element
Returns:
1 if successful otherwise an integral number null or negative

KTL_API KXml* KXml_create KString  header,
KCString  field
 

Creates an XML structure.

Parameters:
header the header of the XML tag
field the value of the tag
Returns:
the pointer to the created XML structure otherwise knull

KTL_API void KXml_deleteRec KXml **  xo  ) 
 

Deletes recursively an XML structure and all its childs.

Parameters:
xo the pointers to the XML structure to be deleted

KTL_API KString KXml_getValue KXml xml,
KString  key
 

Gets the value of a key.

Parameters:
xml the pointer to the XML structure
key the key which value to be searched
Returns:
the value of the first found key in the XML structure if successful otherwise knull

KTL_API void KXml_print KXml xo  ) 
 

Displays an XML structure on the standard output. Used only in debug mode.

Parameters:
xo the pointer to the XML structure to be displayed


Generated on Tue Mar 9 10:49:30 2010 for iKlax Tools Library (KToolLib) by doxygen 1.3.8