#include #include "XmlBuilder.h" #include "SoapUtils.h" #define TEST_SOAP_STR "" \ "" \ "
" \ "uuid:e3c0bc1f-075a-4777-9e01-3e8c7c8c6f98" \ "urn:schemas-xmlsoap-org:ws:2005:04:discovery" \ "http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe" \ "" \ "
" \ "" \ "" \ "tds:Device" \ "" \ "" \ "" \ "
" using namespace onvif; using namespace std; int main(int argc, char **argv) { XmlBuilder builder("test"); // XmlBuilder::nsMap = SoapUtils::getAllXmlNameSpace(); builder.parse(TEST_SOAP_STR); builder.dump(); cout << "test expression out [Envelope.Body.Probe.Types]: " << builder["Envelope.Body.Probe.Types"].stringValue() << endl; cout << "test expression attribute out [Envelope.Body.Probe.Types]: " << builder["Envelope.Body.Probe"].attrib("xmlns:xsi") << endl; }