Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


One more thing...

From: "David Webb" <strangecargo>
To: NULL
Date: 7/3/2007 3:16:00 PM

If I use "//TC1710/*", then I get the results that I want.

However, I also need to be able to display only nodes that have the
attribute A="1" using "//TC1710/*[@A='1']" for the XPATH.
The problem is that descendant nodes of a node that has A="0" are not
displayed whereas they are using "//TC1710/descendant::*[@A='0']" but that
XPATH causes duplicates of the descendant nodes to be displayed.

David


"David Webb" <strangecargo> wrote in message
news:utHxZTavHHA.2068@T......
> I have a .NET 2.0 web form that has a Treeview control bound to an
> XmlDataSource control bound to the following XML document (only the
relevant
> part of the document is shown here):
>
>  <TC1710 A="1" GQ="0" GQ1="0" GQ2="0" PS="0" GC="0" LC="0" OL="">
>   <TC5485 A="0" GQ="0" GQ1="0" GQ2="0" PS="0" GC="0" LC="0" OL="" />
>   <TC0191 A="0" GQ="0" GQ1="0" GQ2="0" PS="0" GC="0" LC="0" OL="">
>    <TC8133 A="0" GQ="0" GQ1="0" GQ2="0" PS="0" GC="0" LC="0" OL="">
>     <TC8151 A="1" GQ="0" GQ1="0" GQ2="0" PS="0" GC="0" LC="0" OL="" />
>     <TC1773 A="1" GQ="0" GQ1="0" GQ2="0" PS="0" GC="0" LC="0" OL="">
>      <TC1779 A="1" GQ="0" GQ1="0" GQ2="0" PS="0" GC="0" LC="0" OL="" />
>     </TC1773> />
>    </TC8133> />
>   </TC0191>
>  </TC1710>
>
> I set the XPATH of the XmlDataSource to "//TC1710/descendant::*" with the
> intention of selecting the descendant nodes of the TC1710 node expecting:
> TC5485
>  -TC0191
>   --TC8133
>   ---TC8151
>   ---TC1773
>   ----TC1779
>
> But instead, each node that is within each descendant is displayed again
as
> separate branches:
> TC5485
>  TC0191
>   -TC8133
>    --TC8151
>    --TC1773
>     ---TC1779
>  TC8133
>  - TC8151
>  - TC1773
>   -- TC1779
>  TC8151
>  TC1773
>  - TC1779
>  TC1779
>
> Shouldn't each node be displayed only once?
>
> There are no duplicates in the XML document. I have not been able to
> determine if this is an issue with my XPATH syntax, the XmlDataSource, or
> the Treeview control.
>
> I really need to be able to display the nodes as organized in the XML
> document. This is my first XPATH project so any help will be greatly
> appreciated.
>
> David
>
>
>
>




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