/ styx_dom.hh / Objects / StyxDom / Public Methods / Description

Public Methods



readFile

bool			readFile(char* filename);
Do parsing of the given file.

Parameters
filename Name of the XML file to parse.

Result: A boolean set to true if the parsing was done without error..


writeDom

bool			writeDom(FILE* file);
Write down a copy of the XML tree to the stream given.

Parameters
file Stream were the XML will be written.

Result: A boolean set to true if no error occurs..


addNode

void			addNode(StyxDomNode* node);
Add an XML node at the top level of the DOM document.

Parameters
node A pointer to a StyxDomNode previously created.


getFromXpath

vector	getFromXpath(string path);
Search nodes in the DOM representation matching a given XPath expression.

Parameters
path The XPath expression.

Result: An array of pointers to the matching nodes..


getNodesFromXpath

vector	getNodesFromXpath(vector l, string path);
Process an XPath expression with a set of nodes.

Parameters
l The set of nodes used to process the XPath expression.
path The XPath expression.

Result: An array of pointers to StyxDomNode..


StyxDom

StyxDom(void)
Constructor


~StyxDom

~StyxDom(void)
Destructor


_rm_equals

static vector	_rm_equals(vector l);
Create a new array of pointers to StyxDomNode, by copying an existing one, without the double elements.

Parameters
l The inital array.

Result: The resulting array..


_merge_vectors

static vector	_merge_vectors(vector v1,
				       vector v2);
Create a new array of pointers to StyxDomNode, by merging two existing ones.

Parameters
v1 The first array.
v2 The second array.

Result: The resulting array..