TwiceAsNice  2019-02-18
Typedefs | Functions
lilxml.h File Reference
#include <stdio.h>
Include dependency graph for lilxml.h:
This graph shows which files directly or indirectly include this file:

Typedefs

typedef struct _xml_att XMLAtt
 
typedef struct _xml_ele XMLEle
 
typedef struct _LilXML LilXML
 

Functions

LilXMLnewLilXML ()
 Create a new lilxml parser. More...
 
void delLilXML (LilXML *lp)
 Delete a lilxml parser. More...
 
void delXMLEle (XMLEle *e)
 Delete an XML element. More...
 
XMLEle ** parseXMLChunk (LilXML *lp, char *buf, int size, char errmsg[])
 Process an XML chunk. More...
 
XMLElereadXMLEle (LilXML *lp, int c, char errmsg[])
 Process an XML one char at a time. More...
 
XMLAttfindXMLAtt (XMLEle *e, const char *name)
 Find an XML attribute within an XML element. More...
 
XMLElefindXMLEle (XMLEle *e, const char *tag)
 Find an XML element within an XML element. More...
 
XMLElenextXMLEle (XMLEle *ep, int first)
 Iterate an XML element for a list of nesetd XML elements. More...
 
XMLAttnextXMLAtt (XMLEle *ep, int first)
 Iterate an XML element for a list of XML attributes. More...
 
XMLEleparentXMLEle (XMLEle *ep)
 Return the parent of an XML element. More...
 
XMLEleparentXMLAtt (XMLAtt *ap)
 Return the parent of an XML attribute. More...
 
char * tagXMLEle (XMLEle *ep)
 Return the tag of an XML element. More...
 
char * pcdataXMLEle (XMLEle *ep)
 Return the pcdata of an XML element. More...
 
char * nameXMLAtt (XMLAtt *ap)
 Return the name of an XML attribute. More...
 
char * valuXMLAtt (XMLAtt *ap)
 Return the value of an XML attribute. More...
 
int pcdatalenXMLEle (XMLEle *ep)
 Return the number of characters in pcdata in an XML element. More...
 
int nXMLEle (XMLEle *ep)
 Return the number of nested XML elements in a parent XML element. More...
 
int nXMLAtt (XMLEle *ep)
 Return the number of XML attributes in a parent XML element. More...
 
XMLEleaddXMLEle (XMLEle *parent, const char *tag)
 add an element with the given tag to the given element. More...
 
void editXMLEle (XMLEle *ep, const char *pcdata)
 set the pcdata of the given element More...
 
XMLAttaddXMLAtt (XMLEle *ep, const char *name, const char *value)
 Add an XML attribute to an existing XML element. More...
 
void rmXMLAtt (XMLEle *ep, const char *name)
 Remove an XML attribute from an XML element. More...
 
void editXMLAtt (XMLAtt *ap, const char *str)
 change the value of an attribute to str. More...
 
char * entityXML (char *str)
 return a string with all xml-sensitive characters within the passed string replaced with their entity sequence equivalents. More...
 
const char * findXMLAttValu (XMLEle *ep, const char *name)
 Find an XML element's attribute value. More...
 
XMLElereadXMLFile (FILE *fp, LilXML *lp, char errmsg[])
 Handy wrapper to read one xml file. More...
 
void prXMLEle (FILE *fp, XMLEle *e, int level)
 Print an XML element. More...
 
int sprXMLEle (char *s, XMLEle *ep, int level)
 sample print ep to string s. More...
 
int sprlXMLEle (XMLEle *ep, int level)
 return number of bytes in a string guaranteed able to hold result of sprXLMEle(ep) (sans trailing \0@). More...
 
void indi_xmlMalloc (void *(*newmalloc)(size_t size), void *(*newrealloc)(void *ptr, size_t size), void(*newfree)(void *ptr))
 

Typedef Documentation

◆ LilXML

typedef struct _LilXML LilXML

◆ XMLAtt

typedef struct _xml_att XMLAtt

◆ XMLEle

typedef struct _xml_ele XMLEle