Click here to Skip to main content
15,913,836 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 13:17
Scott_Roberts17-Aug-06 13:17 
GeneralRe: Ought to be basic, but I'm not getting it! Pin
Scott_Roberts17-Aug-06 16:17
Scott_Roberts17-Aug-06 16:17 
QuestionPosition in a node set Pin
whozurmommy16-Aug-06 21:11
whozurmommy16-Aug-06 21:11 
AnswerRe: Position in a node set Pin
Dustin Metzgar17-Aug-06 5:51
Dustin Metzgar17-Aug-06 5:51 
GeneralRe: Position in a node set Pin
whozurmommy17-Aug-06 8:41
whozurmommy17-Aug-06 8:41 
GeneralRe: Position in a node set Pin
Dustin Metzgar17-Aug-06 9:18
Dustin Metzgar17-Aug-06 9:18 
GeneralRe: Position in a node set Pin
whozurmommy17-Aug-06 18:58
whozurmommy17-Aug-06 18:58 
QuestionWhy it can't work wih "__uuidof(MSXML2::DOMDocument60)"? Pin
Eric Vonjacson15-Aug-06 21:21
Eric Vonjacson15-Aug-06 21:21 
Hi All,

I have a problem with MSXML6 which bother me a lot.
First I have a xml file named "Infor.xml" like this:

<?xml version="1.0" ?>
<Root xmlns="http://EricFeng.org/2004-08-09">
<SubNode>
<Name>Eric</Name>
<Age>24</Age>
</SubNode>
</Root>

Then the codes to analyze this file is like this:

#import <msxml6.dll>
//...

MSXML2::IXMLDOMDocument2Ptr pNewDocument;
pNewDocument.CreateInstance(__uuidof(MSXML2::DOMDocument));
//load the xml file
pNewDocument->load(_bstr_t("Infor.xml"));
MSXML2::IXMLDOMNodeListPtr pNodeList;
//get he sub node "Root/SubNode"
pNodeList = pNewDocument->selectNodes(_bstr_t("Root/SubNode"));
cout<<"The new Node length is "<<pNodeList->Getlength()<<endl;

MSXML2::IXMLDOMNodePtr pSubNode = pNodeList->Getitem(0);
MSXML2::IXMLDOMElementPtr pElement = pSubNode->selectSingleNode(_bstr_t("Name"));
if(pElement != NULL)
{
cout<<"Name is: "<<pElement->Gettext()<<endl;
pElement.Release();
}
pElement = pSubNode->selectSingleNode(_bstr_t("Age"));
if(pElement != NULL)
{
cout<<"Age is: "<<pElement->Gettext()<<endl;
pElement.Release();
}
//....

With MSXML6, I change the "__uuidof(MSXML2::DOMDocument)" to "__uuidof(MSXML2::DOMDocument40)" or "__uuidof(MSXML2::DOMDocument60)". Then the codes above can't work.

I searched the help file os msxml6 and found that the GUIDS are related the version of MSXML. The table can be like this:

ProgID Version
MSXML2::DOMDocument msxml3.dll
MSXML2:: DOMDocument40 msxml4.dll
MSXML2::DOMDocument60 msxml6.dll

With MSXML6. Should I need to replace the "__uuidof(MSXML2::DOMDocument)" wihe "__uuidof(MSXML2::DOMDocument60)"?

Thanks,
Eric















QuestionXML node insertion Pin
biaali15-Aug-06 4:36
biaali15-Aug-06 4:36 
AnswerRe: XML node insertion Pin
Dustin Metzgar15-Aug-06 5:09
Dustin Metzgar15-Aug-06 5:09 
QuestionNew to XML Pin
lehya14-Aug-06 5:17
lehya14-Aug-06 5:17 
AnswerRe: New to XML Pin
Dustin Metzgar14-Aug-06 8:57
Dustin Metzgar14-Aug-06 8:57 
GeneralRe: New to XML Pin
lehya14-Aug-06 10:31
lehya14-Aug-06 10:31 
GeneralRe: New to XML Pin
Dustin Metzgar14-Aug-06 11:00
Dustin Metzgar14-Aug-06 11:00 
GeneralRe: New to XML [modified] Pin
manowj18-Aug-06 22:38
manowj18-Aug-06 22:38 
AnswerRe: New to XML Pin
Dustin Metzgar22-Aug-06 11:13
Dustin Metzgar22-Aug-06 11:13 
QuestionMS Access 2003 and Exporting in a XML Format Pin
sweep12314-Aug-06 3:53
sweep12314-Aug-06 3:53 
AnswerRe: MS Access 2003 and Exporting in a XML Format Pin
Stephen McGuire14-Aug-06 15:18
Stephen McGuire14-Aug-06 15:18 
QuestionAccess violation exception while trying to create a XML Element Pin
adidas.levy12-Aug-06 22:52
adidas.levy12-Aug-06 22:52 
AnswerRe: Access violation exception while trying to create a XML Element Pin
led mike15-Aug-06 6:03
led mike15-Aug-06 6:03 
GeneralRe: Access violation exception while trying to create a XML Element Pin
adidas.levy15-Aug-06 19:52
adidas.levy15-Aug-06 19:52 
QuestionNeed XML Help Pin
Amit Kumar G12-Aug-06 9:53
Amit Kumar G12-Aug-06 9:53 
AnswerRe: Need XML Help Pin
Rizwan Bashir15-Aug-06 3:48
Rizwan Bashir15-Aug-06 3:48 
AnswerRe: Need XML Help Pin
Amit Kumar G15-Aug-06 14:16
Amit Kumar G15-Aug-06 14:16 
QuestionNamespace in XMLDocument Pin
VSush10-Aug-06 0:34
VSush10-Aug-06 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.