Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
xml::XmlReader Class Referenceabstract

XmlReader abstraction class. More...

#include <src/api/mip/xml_reader.h>

Public Member Functions

virtual std::string DumpNode ()=0
 Method returns all node elements in an unmodified way from the original xml.
 
virtual std::string GetAncestors () const =0
 Returns current node ancestors (for debug text), in the following purpose <node grand parent attributes=...>><node parent><node>.
 
virtual bool GetAttribute (const std::string &attributeName, std::string &attribute) const =0
 Returns true if attributes was found.
 
virtual std::string GetName () const =0
 Returns the name if found, exception otherwise.
 
virtual bool GetName (std::string &name) const =0
 Returns if name was found.
 
virtual XmlNodeType GetNodeType () const =0
 Get current node type.
 
virtual bool GetValue (std::string &value) const =0
 Returns if value was found.
 
virtual bool HasAttributes () const =0
 Returns whether the current node has attributes.
 
virtual bool IsEmptyElement () const =0
 Returns whether the current node as an empty element.
 
virtual bool MoveToElement ()=0
 Move from attribute to element.
 
virtual bool MoveToFirstAttribute ()=0
 Move to first attribute.
 
virtual bool MoveToNextAttribute ()=0
 Move to Next attribute.
 
virtual bool Read ()=0
 Reads the next node of the element.
 
virtual bool Skip ()=0
 Skips current node until it finds a non empty node.
 

Detailed Description

XmlReader abstraction class.

Definition at line 48 of file xml_reader.h.

Member Function Documentation

◆ DumpNode()

virtual std::string xml::XmlReader::DumpNode ( )
pure virtual

Method returns all node elements in an unmodified way from the original xml.

Warning
throws XmlParserException on failure
Returns
entire serialized element.
Note
moved to end of node.

◆ GetAncestors()

virtual std::string xml::XmlReader::GetAncestors ( ) const
pure virtual

Returns current node ancestors (for debug text), in the following purpose <node grand parent attributes=...>><node parent><node>.

Note
used for debugging purposes, and error logging.

Referenced by xml::XmlParserException::XmlParserException().

◆ GetAttribute()

virtual bool xml::XmlReader::GetAttribute ( const std::string & attributeName,
std::string & attribute ) const
pure virtual

Returns true if attributes was found.

Sets attribute only when true. empty attribute is possible..

Parameters
attributeNameattribute name.
attributeattribute value.
Returns
true if successful

◆ GetName() [1/2]

virtual std::string xml::XmlReader::GetName ( ) const
pure virtual

Returns the name if found, exception otherwise.

empty name is possible.

Warning
throws XmlParserException on failure
Returns
node name.

Referenced by xml::XmlParserException::XmlParserException().

◆ GetName() [2/2]

virtual bool xml::XmlReader::GetName ( std::string & name) const
pure virtual

Returns if name was found.

Sets name only when true. empty name is possible.

Returns
node name.

◆ GetNodeType()

virtual XmlNodeType xml::XmlReader::GetNodeType ( ) const
pure virtual

Get current node type.

Returns
Xml Reader Node type.

Referenced by xml::XmlParserException::XmlParserException().

◆ GetValue()

virtual bool xml::XmlReader::GetValue ( std::string & value) const
pure virtual

Returns if value was found.

Sets value only when true. empty value is possible..

Parameters
valueoutput value
Returns
true if value exists else false.

Referenced by xml::XmlParserException::XmlParserException().

◆ HasAttributes()

virtual bool xml::XmlReader::HasAttributes ( ) const
pure virtual

Returns whether the current node has attributes.

Warning
throws XmlParserException on failure
Returns
true if the current node has attributes.

◆ IsEmptyElement()

virtual bool xml::XmlReader::IsEmptyElement ( ) const
pure virtual

Returns whether the current node as an empty element.

Warning
throws XmlParserException on failure
Returns
true if element is empty.

◆ MoveToElement()

virtual bool xml::XmlReader::MoveToElement ( )
pure virtual

Move from attribute to element.

Warning
throws XmlParserException on failure
Returns
true if successful

◆ MoveToFirstAttribute()

virtual bool xml::XmlReader::MoveToFirstAttribute ( )
pure virtual

Move to first attribute.

Warning
throws XmlParserException on failure
Returns
true if successful

◆ MoveToNextAttribute()

virtual bool xml::XmlReader::MoveToNextAttribute ( )
pure virtual

Move to Next attribute.

Warning
throws XmlParserException on failure
Returns
true if successful

◆ Read()

virtual bool xml::XmlReader::Read ( )
pure virtual

Reads the next node of the element.

Warning
throws XmlParserException on failure
Returns
true if read node successfully.

◆ Skip()

virtual bool xml::XmlReader::Skip ( )
pure virtual

Skips current node until it finds a non empty node.

Warning
throws XmlParserException on failure
Returns
true if name successful.

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