FIX::PUGIXML_DOMDocument Class Reference

XML document as represented by pugixml. More...

`#include <PUGIXML_DOMDocument.h>`

Inheritance diagram for FIX::PUGIXML_DOMDocument:
[legend]
Collaboration diagram for FIX::PUGIXML_DOMDocument:
[legend]

## Public Member Functions

| PUGIXML_DOMDocument () throw ( ConfigError )
| ~PUGIXML_DOMDocument ()
bool | load (std::istream &)
bool | load (const std::string &)
bool | xml (std::ostream &)
DOMNodePtr | getNode (const std::string &)
Public Member Functions inherited from FIX::DOMDocument
virtual | ~DOMDocument ()

## Private Attributes

pugi::xml_document | m_pDoc

## Detailed Description

XML document as represented by pugixml.

Definition at line 64 of file PUGIXML_DOMDocument.h.

## Constructor & Destructor Documentation

## PUGIXML_DOMDocument()

FIX::PUGIXML_DOMDocument::PUGIXML_DOMDocument | ( |  | ) |
throw | ( | ConfigError
| ) |  |

Definition at line 73 of file PUGIXML_DOMDocument.cpp.

{
}

## ~PUGIXML_DOMDocument()

FIX::PUGIXML_DOMDocument::~PUGIXML_DOMDocument | ( |  | ) |

Definition at line 77 of file PUGIXML_DOMDocument.cpp.

{
//xmlFreeDoc(m_pDoc);
}

## Member Function Documentation

## getNode()

DOMNodePtr FIX::PUGIXML_DOMDocument::getNode | ( | const std::string & | XPath | ) |

virtual

Implements FIX::DOMDocument.

Definition at line 105 of file PUGIXML_DOMDocument.cpp.

{
pugi::xpath_node result = m_pDoc.select_single_node(XPath.c_str());
if( !result ) return DOMNodePtr();
return DOMNodePtr(new PUGIXML_DOMNode(result.node()));
}
FIX::PUGIXML_DOMDocument::m_pDoc
pugi::xml_document m_pDoc
Definition: PUGIXML_DOMDocument.h:77
FIX::DOMNodePtr
SmartPtr< DOMNode > DOMNodePtr
Definition: DOMDocument.h:59

References m_pDoc.

## load() [1/2]

bool FIX::PUGIXML_DOMDocument::load | ( | const std::string & | url | ) |

virtual

Implements FIX::DOMDocument.

Definition at line 91 of file PUGIXML_DOMDocument.cpp.

{
try
{
return m_pDoc.load_file(url.c_str());
}
catch( ... ) { return false; }
}

References m_pDoc.

## load() [2/2]

bool FIX::PUGIXML_DOMDocument::load | ( | std::istream & | stream | ) |

virtual

Implements FIX::DOMDocument.

Definition at line 82 of file PUGIXML_DOMDocument.cpp.

{
try
{
return m_pDoc.load(stream);
}
catch( ... ) { return false; }
}

References m_pDoc.

## xml()

bool FIX::PUGIXML_DOMDocument::xml | ( | std::ostream & | out | ) |

virtual

Implements FIX::DOMDocument.

Definition at line 100 of file PUGIXML_DOMDocument.cpp.

{
return false;
}

## Member Data Documentation

## m_pDoc

pugi::xml_document FIX::PUGIXML_DOMDocument::m_pDoc

private

Definition at line 77 of file PUGIXML_DOMDocument.h.

Referenced by getNode(), and load().

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

- PUGIXML_DOMDocument.h
- PUGIXML_DOMDocument.cpp