Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: RE:Parsing XML

From: "Joe Fawcett" <joefawcett@----------.------>
To: 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 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent