How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
Go Back  Xtreme Visual Basic Talk > > > How to set attributes / add children with duplicate node names


Reply
 
Thread Tools Display Modes
  #1  
Old 08-11-2014, 11:26 PM
mhnxtrvb mhnxtrvb is offline
Newcomer
 
Join Date: Aug 2014
Posts: 2
Default How to set attributes / add children with duplicate node names


I need to add children and set the attribute for a node where it is the second instance in a family of nodes.
But I cant seem to find a way to "SelectSingleNode" so that I can add children and set attributes.
This is what I have created so far:

<Markers ObjectID="22" ClassID="bee50706-b524-416c-9f03-b596ce5f6866" Version="2">
<Markers Version="1" ObjectRef="24">
<Marker Version="1" Index="0">
<Second ObjectRef="23"/>
<First>5009872344</First>
</Marker>
<Marker/>
</Markers>
<Node Version="1"/>
</Markers>

=========================================================
I cant get any further because I cant set the attribute of the second instance of the node "Marker". Everything I try sets the first instance of "Marker" and replaces what it already has.

This is what I need to end up with:

<Markers ObjectID="22" ClassID="bee50706-b524-416c-9f03-b596ce5f6866" Version="2">
<Markers Version="1">
<Marker Version="1" Index="0">
<Second ObjectRef="23"/>
<First>5009119315200</First>
</Marker>
<Marker Version="1" Index="1">
<Second ObjectRef="24"/>
<First>419274305049600</First>
</Marker>
</Markers>
<Node Version="1"/>
</Markers>

A nodelist of "//Markers[@ObjectID='22'/Markers/Marker) produces 2 items in the list.
I am trying to figure out how to reference a single node from this list but I just cant figure out how.

Is there a way to identify a node that has no attributes???
Thanks for your help
Reply With Quote
Reply

Tags
set attributes, xml


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
 
How to set attributes / add children with duplicate node names
How to set attributes / add children with duplicate node names
 
-->