|
mbxmlutils
1.3.0
Multi-Body XML Utils
|
Helper class for extending DOMDocument (use the function D(...)). More...
#include <dom.h>
Public Member Functions | |
| DOMDocumentWrapper (DOMDocumentType *me_) | |
| Wrap DOMDocument to my special element. | |
| void | validate () |
| (re)validate the document using the parser this document was created | |
| xercesc::DOMElement * | createElement (const FQN &name) |
| std::shared_ptr< DOMParser > | getParser () const |
| Get full qualified tag name. | |
| boost::filesystem::path | getDocumentFilename () const |
| xercesc::DOMNode * | evalRootXPathExpression (std::string xpathExpression, xercesc::DOMElement *context=nullptr) |
| std::conditional< std::is_same< DOMDocumentType, const xercesc::DOMDocument >::value, const DOMDocumentWrapper *, DOMDocumentWrapper * >::type | operator-> () |
| Treat this object as a pointer (like DOMDocument*) | |
Private Attributes | |
| DOMDocumentType * | me |
Helper class for extending DOMDocument (use the function D(...)).
| xercesc::DOMElement * MBXMLUtils::DOMDocumentWrapper< DOMDocumentType >::createElement | ( | const FQN & | name | ) |
create element with the given FQN Note: a empty namespace (name.first.empty()==true) as no namespace
| DOMNode * MBXMLUtils::DOMDocumentWrapper< DOMDocumentType >::evalRootXPathExpression | ( | std::string | xpathExpression, |
| xercesc::DOMElement * | context = nullptr |
||
| ) |
Get the node (DOMElement or DOMAttrType) corresponding the given xpathExpression relative to the root. If context is nullptr than the root element is used. Only a very small subset of XPath is supported by this function (just the one returned by getRootXPathExpression)
| template path MBXMLUtils::DOMDocumentWrapper< DOMDocumentType >::getDocumentFilename | ( | ) | const |
Get the filename of the document. This is the same as getDocumentURI but with the file schema removed and is a relative path if it was read by a relative path