G
Guest
Hello All:
I have an xml document with the following structure, where Form is the
document element:
<Form>
<Content>
<Line>blah blah blah</Line>
<Line>
<PresentationGroup>
miscellaneous tags
</PresentationGroup>
</Line>
<Line>blah blah blah 2</Line>
<Line>
<PresentationGroup>
miscellaneous tags
</PresentationGroup>
</Line>
</Content>
</Form>
I want an XPath to the last PresentationGroup node (there are multiple
PresentationGroup nodes per xml document and the number of PresentationGroup
nodes per document changes from one document to the next). I've tried
"Content/Line/PresentationGroup[last()]" and am getting nothing.
My code looks like:
xmlDoc.DocumentElement.SelectSingleNode("Content/Line/PresentationGroup[last()]")
This returns Nothing. I can't figure out why, although I'm sure that it's
simple!
Can anyone see what I am doing wrong?
TIA,
I have an xml document with the following structure, where Form is the
document element:
<Form>
<Content>
<Line>blah blah blah</Line>
<Line>
<PresentationGroup>
miscellaneous tags
</PresentationGroup>
</Line>
<Line>blah blah blah 2</Line>
<Line>
<PresentationGroup>
miscellaneous tags
</PresentationGroup>
</Line>
</Content>
</Form>
I want an XPath to the last PresentationGroup node (there are multiple
PresentationGroup nodes per xml document and the number of PresentationGroup
nodes per document changes from one document to the next). I've tried
"Content/Line/PresentationGroup[last()]" and am getting nothing.
My code looks like:
xmlDoc.DocumentElement.SelectSingleNode("Content/Line/PresentationGroup[last()]")
This returns Nothing. I can't figure out why, although I'm sure that it's
simple!
Can anyone see what I am doing wrong?
TIA,