HDK
|
#include <UT_XMLReader.h>
Public Member Functions | |
UT_XMLReader () | |
Standard constructor. More... | |
~UT_XMLReader () | |
Standard destructor. More... | |
bool | beginReadingFromFile (const char *file) |
Initialize the reader to read from file. More... | |
bool | beginReadingFromMemory (const UT_WorkBuffer &memory, const char *URL, const char *encoding=nullptr) |
Initialize the reader to read from memory buffer. More... | |
bool | read () |
Read the next XML element. More... | |
const UT_XMLNode * | getNode () |
UT_XMLNodeType | getNodeType () const |
Return the type for the currently read XML node. More... | |
int | getNodeDepth () const |
Return the depth of the current node in the XML document. More... | |
bool | hasNodeAttributes () const |
bool | hasNodeValue () const |
void | getNodeName (UT_WorkBuffer &name) const |
void | getNodeName (UT_StringHolder &name) const |
void | getNodeContents (UT_WorkBuffer &contents) const |
void | getNodeContents (UT_StringHolder &contents) const |
void | getNodeAttribute (const char *attr_name, UT_WorkBuffer &attr_val) const |
void | getNodeAttribute (const char *attr_name, UT_StringHolder &attr_val) const |
void | getNodeValue (UT_WorkBuffer &node_val) const |
void | getNodeValue (UT_StringHolder &node_val) const |
Definition at line 28 of file UT_XMLReader.h.
UT_XMLReader::UT_XMLReader | ( | ) |
Standard constructor.
UT_XMLReader::~UT_XMLReader | ( | ) |
Standard destructor.
bool UT_XMLReader::beginReadingFromFile | ( | const char * | file | ) |
Initialize the reader to read from file.
bool UT_XMLReader::beginReadingFromMemory | ( | const UT_WorkBuffer & | memory, |
const char * | URL, | ||
const char * | encoding = nullptr |
||
) |
Initialize the reader to read from memory buffer.
const UT_XMLNode* UT_XMLReader::getNode | ( | ) |
Return the currently read node. Return NULL if no node has been read.
void UT_XMLReader::getNodeAttribute | ( | const char * | attr_name, |
UT_WorkBuffer & | attr_val | ||
) | const |
Pass back the value of the specified attribute on the current node.
|
inline |
Pass back the value of the specified attribute on the current node.
Definition at line 90 of file UT_XMLReader.h.
void UT_XMLReader::getNodeContents | ( | UT_WorkBuffer & | contents | ) | const |
Pass back the contents of the currently read XML element or text node.
|
inline |
Pass back the contents of the currently read XML element or text node.
Definition at line 70 of file UT_XMLReader.h.
int UT_XMLReader::getNodeDepth | ( | ) | const |
Return the depth of the current node in the XML document.
void UT_XMLReader::getNodeName | ( | UT_WorkBuffer & | name | ) | const |
Pass back the name of the currently read XML node.
|
inline |
Pass back the name of the currently read XML node.
Definition at line 59 of file UT_XMLReader.h.
UT_XMLNodeType UT_XMLReader::getNodeType | ( | ) | const |
Return the type for the currently read XML node.
void UT_XMLReader::getNodeValue | ( | UT_WorkBuffer & | node_val | ) | const |
Pass back the value of the current node.
|
inline |
Pass back the value of the current node.
Definition at line 106 of file UT_XMLReader.h.
bool UT_XMLReader::hasNodeAttributes | ( | ) | const |
Return true if the currently read node has attributes. Return false otherwise.
bool UT_XMLReader::hasNodeValue | ( | ) | const |
Return true if the currently read node has a value. Return false otherwise.
bool UT_XMLReader::read | ( | ) |
Read the next XML element.