Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - RE:Parsing XML [Thread Next] Re: RE:Parsing XMLTo: NULL Date: 5/2/2005 12:23:00 PM "Murali" <Murali@d...> wrote in message
news:65C0483D-8609-4031-93F5-FE08B905B3C9@m......
> Hi there,
> Here I have my XML string
>
> <?xml version="1.0" encoding="utf-8"?>
> <root>
> <input>
> <nodeid>0</nodeid>
> <parentid>0</parentid>
> <userinput>0</userinput>
> </input>
> <output>
> <vrurequestscript>
> <datainput>
> <mainmsgid>39.wav</mainmsgid>
> <correctvalues>1,2</correctvalues>
> <charset>12</charset>
> <length>1</length>
> <timeout>10000</timeout>
> <timeoutmsgid>200</timeoutmsgid>
> <retrycount>3</retrycount>
> <retryexitaction>end</retryexitaction>
> <retryexitmsgid>300</retryexitmsgid>
> </datainput>
> <confirminput>
> <mainmsgid>101</mainmsgid>
> <correctvalues>1,2</correctvalues>
> <charset>12</charset>
> <accept>1</accept>
> <reject>2</reject>
> <length>1</length>
> <timeout>10000</timeout>
> <timeoutmsgid>200</timeoutmsgid>
> <retrycount>3</retrycount>
> <retryexitaction>end</retryexitaction>
> <retryexitmsgid>300</retryexitmsgid>
> </confirminput>
> </vrurequestscript>
> </output>
> </root>
>
> when I try to parse this XML using MSXML DOM object,
> BSTR bstrnode
>
> pXMLDom->selectSingleNode(_bstr_t("root/output/vrurequestscript/datainput/text()")
> ,& pNode)
> pNode->get_nodeName(bstrnode)
>
>
>
>
> I am getting "the following tags were not closed root,
> output,vrurequestscript, confirminput"
>
>
> Is my XML constuction is worong?
>
> Any help appriciated.
> -Murali
>
I can't see anything wrong, are you sure the encoding declared is accurate?
As a side issue text nodes don't really have a name, using msxml all you'll get
is #text.
--
Joe (MVP - XML)
https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
