HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_XMLReader Class Reference

#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_XMLNodegetNode ()
 
UT_XMLNodeType getNodeType () const
 Return the type for the currently read XML node. More...
 
void getNodeName (UT_String &name) const
 Pass back the name of the currently read XML node. More...
 
void getNodeContents (UT_String &contents) const
 Pass back the contents of the currently read XML element or text node. More...
 
int getNodeDepth () const
 Return the depth of the current node in the XML document. More...
 
bool hasNodeAttributes () const
 
void getNodeAttribute (const char *attr_name, UT_String &attr_val) const
 Pass back the value of the specified attribute on the current node. More...
 
bool hasNodeValue () const
 
void getNodeValue (UT_String &node_val) const
 Pass back the value of the current node. More...
 

Detailed Description

Definition at line 27 of file UT_XMLReader.h.

Constructor & Destructor Documentation

UT_XMLReader::UT_XMLReader ( )

Standard constructor.

UT_XMLReader::~UT_XMLReader ( )

Standard destructor.

Member Function Documentation

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_String attr_val 
) const

Pass back the value of the specified attribute on the current node.

void UT_XMLReader::getNodeContents ( UT_String contents) const

Pass back the contents of the currently read XML element or text node.

int UT_XMLReader::getNodeDepth ( ) const

Return the depth of the current node in the XML document.

void UT_XMLReader::getNodeName ( UT_String name) const

Pass back the name of the currently read XML node.

UT_XMLNodeType UT_XMLReader::getNodeType ( ) const

Return the type for the currently read XML node.

void UT_XMLReader::getNodeValue ( UT_String node_val) const

Pass back the value of the current node.

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.


The documentation for this class was generated from the following file: