EDN Admin
Well-known member
This is my SAMPLE XML file below:
<pre class="prettyprint <?xml version="1.0" encoding="ISO-8859-1"?>
<Country xmlns="x-schemaqrID.xml"
xmlns:abc="x-schema:abcID.xml
<state Code="10" id="5
</state>
<population>
<districts (some attributes) >
<places (some attributes )>
</places>
<abc:Gid mainID="123" >
</abc:Gid>
<abc:Gid mainID="125" >
</abc:Gid>
</districts>
</population>
</country>
[/code]
I want to retrieve the attributes of "state"......I am able to acheive this with msxml3 but not with msxml6......following is my c++ code..
<pre class="prettyprint #import <msxml6.dll>
using namespace MSXML2;
main
{
VARIANT_BOOL Result;
_bstr_t FileName("C:\temp\abc.xml");
MSXML2::IXMLDOMDocumentPtr pMyXMLDoc;
MSXML2::IXMLDOMNodePtr pMyXMLNode;
MSXML2::IXMLDOMNamedNodeMapPtr pMyXMLAttributes;
pMyXMLDoc=MSXML2::IXMLDOMDocumentPtr(MSXML2::CLSID_DOMDocument60);
Result = pMyXMLDoc->load(FileName);
pMyXMLNode=pMyXMLDoc->selectSingleNode(L"//state");
pMyXMLAttributes= pMyXMLNode->Getattributes();
long Len;
Len=pMyXMLAttributes->Getlength();
return 0
}[/code]
Because of MSXML3 has memory leak issue ..i want to upgrade to MSXML6...pls help asap..
<br/>
View the full article
<pre class="prettyprint <?xml version="1.0" encoding="ISO-8859-1"?>
<Country xmlns="x-schemaqrID.xml"
xmlns:abc="x-schema:abcID.xml
<state Code="10" id="5
</state>
<population>
<districts (some attributes) >
<places (some attributes )>
</places>
<abc:Gid mainID="123" >
</abc:Gid>
<abc:Gid mainID="125" >
</abc:Gid>
</districts>
</population>
</country>
[/code]
I want to retrieve the attributes of "state"......I am able to acheive this with msxml3 but not with msxml6......following is my c++ code..
<pre class="prettyprint #import <msxml6.dll>
using namespace MSXML2;
main
{
VARIANT_BOOL Result;
_bstr_t FileName("C:\temp\abc.xml");
MSXML2::IXMLDOMDocumentPtr pMyXMLDoc;
MSXML2::IXMLDOMNodePtr pMyXMLNode;
MSXML2::IXMLDOMNamedNodeMapPtr pMyXMLAttributes;
pMyXMLDoc=MSXML2::IXMLDOMDocumentPtr(MSXML2::CLSID_DOMDocument60);
Result = pMyXMLDoc->load(FileName);
pMyXMLNode=pMyXMLDoc->selectSingleNode(L"//state");
pMyXMLAttributes= pMyXMLNode->Getattributes();
long Len;
Len=pMyXMLAttributes->Getlength();
return 0
}[/code]
Because of MSXML3 has memory leak issue ..i want to upgrade to MSXML6...pls help asap..
<br/>
View the full article