Public Member Functions

AppSecInc::Xml::XmlDocument Class Reference

An MSXML document. More...

#include <XmlDocument.h>

List of all members.

Public Member Functions

 XmlDocument ()
void Create (const CLSID clsid=MSXML2::CLSID_DOMDocument)
 create an empty xml document
void Load (const std::wstring &filename, const CLSID clsid=MSXML2::CLSID_DOMDocument)
 load an xml document
void LoadXml (const std::wstring &xml, const CLSID clsid=MSXML2::CLSID_DOMDocument)
 load an xml buffer
MSXML2::IXMLDOMNodePtr FindNode (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 find node, returns NULL if the node doesn't exist
bool HasNodes (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 has nodes
bool HasNode (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 has node
MSXML2::IXMLDOMNodePtr SelectNode (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 select node
MSXML2::IXMLDOMNodeListPtr SelectNodes (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 select nodes
MSXML2::IXMLDOMNodeListPtr FindNodes (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 find nodes, returns NULL if not found
std::wstring GetNodeXml (MSXML2::IXMLDOMNode *node) const
 return node's string value
std::wstring GetNodeValue (MSXML2::IXMLDOMNode *node) const
 return node's string value
bool GetNodeBoolValue (MSXML2::IXMLDOMNode *node) const
 return node's boolean value
bool GetNodeBoolValue (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 select a node and return its boolean value
bool GetNodeBoolValue (const std::wstring &xpath, MSXML2::IXMLDOMNode *parent, bool defaultvalue) const
 select a node and return its boolean value
std::wstring GetNodeValue (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 select a node and return its value
std::wstring GetNodeValue (const std::wstring &xpath, MSXML2::IXMLDOMNode *, const std::wstring &defaultvalue) const
 select a node and return its value with a default
std::wstring GetNodeXml (const std::wstring &xpath, MSXML2::IXMLDOMNode *=NULL) const
 select a node and return its inner xml
std::wstring GetNodeXml (const std::wstring &xpath, MSXML2::IXMLDOMNode *, const std::wstring &defaultvalue) const
 select a node and return its inner xml with a default value
std::wstring GetXml () const
 get outer xml
MSXML2::IXMLDOMAttributePtr FindAttribute (const std::wstring &name, MSXML2::IXMLDOMNode *node) const
 find an attribute
std::wstring GetAttributeValue (MSXML2::IXMLDOMAttribute *attribute) const
 return the value of an attribute
bool GetAttributeBoolValue (MSXML2::IXMLDOMAttribute *attribute) const
 return a boolean value of an attribute
std::wstring GetAttributeValue (const std::wstring &xpath, const std::wstring &attributename, MSXML2::IXMLDOMNode *=NULL) const
 select a node, fetch an attribute and return its value
MSXML2::IXMLDOMNodePtr AppendChild (const std::wstring &name, MSXML2::IXMLDOMNode *parent=NULL, const _variant_t &type=VT_NULL, LPCWSTR pszNamespaceUri=NULL)
 append a new node
MSXML2::IXMLDOMAttributePtr SetAttribute (const std::wstring &name, const std::wstring &value, MSXML2::IXMLDOMNode *node)
 append a new node
MSXML2::IXMLDOMAttributePtr SelectAttribute (const std::wstring &name, MSXML2::IXMLDOMNode *) const
 select attribute node
bool HasAttribute (const std::wstring &name, MSXML2::IXMLDOMNode *) const
 has attribute
bool GetAttributeBoolValue (const std::wstring &name, MSXML2::IXMLDOMNode *) const
 select an attribute and return its boolean value
bool GetAttributeBoolValue (const std::wstring &name, MSXML2::IXMLDOMNode *, bool defaultvalue) const
 select an attribute and return its boolean value
std::wstring GetAttributeValue (const std::wstring &name, MSXML2::IXMLDOMNode *) const
 select an attribute and return its value
std::wstring GetAttributeValue (const std::wstring &name, MSXML2::IXMLDOMNode *, const std::wstring &defaultvalue) const
 select an attribute and return its value with a default
std::wstring XslTransform (const std::wstring xslt_filename)
 transform an xml with xslt
MSXML2::IXMLDOMDocument * operator-> () const throw ()
 IXMLDOMDocument.
std::wstring GetParseError () const
 error

Detailed Description

An MSXML document.


Constructor & Destructor Documentation

XmlDocument::XmlDocument ( )

Member Function Documentation

MSXML2::IXMLDOMNodePtr XmlDocument::AppendChild ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  parent = NULL,
const _variant_t &  type = VT_NULL,
LPCWSTR  pszNamespaceUri = NULL 
)

append a new node

void XmlDocument::Create ( const CLSID  clsid = MSXML2::CLSID_DOMDocument)

create an empty xml document

MSXML2::IXMLDOMAttributePtr XmlDocument::FindAttribute ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  node 
) const

find an attribute

MSXML2::IXMLDOMNodePtr XmlDocument::FindNode ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

find node, returns NULL if the node doesn't exist

MSXML2::IXMLDOMNodeListPtr XmlDocument::FindNodes ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

find nodes, returns NULL if not found

bool XmlDocument::GetAttributeBoolValue ( MSXML2::IXMLDOMAttribute *  attribute) const

return a boolean value of an attribute

bool XmlDocument::GetAttributeBoolValue ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  node 
) const

select an attribute and return its boolean value

bool XmlDocument::GetAttributeBoolValue ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  node,
bool  defaultvalue 
) const

select an attribute and return its boolean value

std::wstring XmlDocument::GetAttributeValue ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  node,
const std::wstring &  defaultvalue 
) const

select an attribute and return its value with a default

std::wstring XmlDocument::GetAttributeValue ( MSXML2::IXMLDOMAttribute *  attribute) const

return the value of an attribute

std::wstring XmlDocument::GetAttributeValue ( const std::wstring &  xpath,
const std::wstring &  attributename,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

select a node, fetch an attribute and return its value

std::wstring XmlDocument::GetAttributeValue ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  node 
) const

select an attribute and return its value

bool XmlDocument::GetNodeBoolValue ( MSXML2::IXMLDOMNode *  node) const

return node's boolean value

bool XmlDocument::GetNodeBoolValue ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

select a node and return its boolean value

bool XmlDocument::GetNodeBoolValue ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent,
bool  defaultvalue 
) const

select a node and return its boolean value

std::wstring XmlDocument::GetNodeValue ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent,
const std::wstring &  defaultvalue 
) const

select a node and return its value with a default

std::wstring XmlDocument::GetNodeValue ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

select a node and return its value

std::wstring XmlDocument::GetNodeValue ( MSXML2::IXMLDOMNode *  node) const

return node's string value

std::wstring XmlDocument::GetNodeXml ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

select a node and return its inner xml

std::wstring XmlDocument::GetNodeXml ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent,
const std::wstring &  defaultvalue 
) const

select a node and return its inner xml with a default value

std::wstring XmlDocument::GetNodeXml ( MSXML2::IXMLDOMNode *  node) const

return node's string value

std::wstring XmlDocument::GetParseError ( ) const

error

std::wstring XmlDocument::GetXml ( ) const

get outer xml

bool XmlDocument::HasAttribute ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  node 
) const

has attribute

bool XmlDocument::HasNode ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

has node

bool XmlDocument::HasNodes ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

has nodes

void XmlDocument::Load ( const std::wstring &  filename,
const CLSID  clsid = MSXML2::CLSID_DOMDocument 
)

load an xml document

void XmlDocument::LoadXml ( const std::wstring &  xml,
const CLSID  clsid = MSXML2::CLSID_DOMDocument 
)

load an xml buffer

MSXML2::IXMLDOMDocument* AppSecInc::Xml::XmlDocument::operator-> ( ) const throw () [inline]

IXMLDOMDocument.

MSXML2::IXMLDOMAttributePtr XmlDocument::SelectAttribute ( const std::wstring &  name,
MSXML2::IXMLDOMNode *  node 
) const

select attribute node

MSXML2::IXMLDOMNodePtr XmlDocument::SelectNode ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

select node

MSXML2::IXMLDOMNodeListPtr XmlDocument::SelectNodes ( const std::wstring &  xpath,
MSXML2::IXMLDOMNode *  parent = NULL 
) const

select nodes

MSXML2::IXMLDOMAttributePtr XmlDocument::SetAttribute ( const std::wstring &  name,
const std::wstring &  value,
MSXML2::IXMLDOMNode *  node 
)

append a new node

std::wstring XmlDocument::XslTransform ( const std::wstring  xslt_filename)

transform an xml with xslt


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


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com