Hi All,
Firstly whats the tag for displaying code properly in these messages?
<code> </code> or similar?
<ADTfile>
<Message>
<Header>
<DocumentName>A File</DocumentName>
<ATversion>2.3</ATversion>
</Header>
</Message>
<Pupils>
-- NOTE: lots of these.
<Pupil>
<UPN>F938870105001</UPN>
</Pupil>
</Pupils>
</ADTfile>
Id like to navigate to the UPN in this file so starting at the DocumentElement (root) is of no use as itll just go through the Message and Header etc. then never get to Pupils. I assume there is an easier way to do this (xpath??). If you can see what Im doing Id appreciate a few pointers. Thanks, Tim
private void ModifyWithChildren()
{
// If there are any child nodes
// Call this procedure recursively
if (xnod.HasChildNodes)
{
xnod = xnod.FirstChild;
string myname = xnod.Name;
ModifyWithChildren();
}
while(xnod != null)
{
DoXMLUpdate(xnod);
if (xnod.NextSibling != null)
{
xnod = xnod.NextSibling;
}
}
}
Firstly whats the tag for displaying code properly in these messages?
<code> </code> or similar?
<ADTfile>
<Message>
<Header>
<DocumentName>A File</DocumentName>
<ATversion>2.3</ATversion>
</Header>
</Message>
<Pupils>
-- NOTE: lots of these.
<Pupil>
<UPN>F938870105001</UPN>
</Pupil>
</Pupils>
</ADTfile>
Id like to navigate to the UPN in this file so starting at the DocumentElement (root) is of no use as itll just go through the Message and Header etc. then never get to Pupils. I assume there is an easier way to do this (xpath??). If you can see what Im doing Id appreciate a few pointers. Thanks, Tim
private void ModifyWithChildren()
{
// If there are any child nodes
// Call this procedure recursively
if (xnod.HasChildNodes)
{
xnod = xnod.FirstChild;
string myname = xnod.Name;
ModifyWithChildren();
}
while(xnod != null)
{
DoXMLUpdate(xnod);
if (xnod.NextSibling != null)
{
xnod = xnod.NextSibling;
}
}
}