Hi all,
I am getting an error while parsing my XML with C#. I need to find the level of each <unordered-list> node in this document. But when I try to read the xmlNode.ParentNode.Name for the Level 2 (or more) node, I receive "Undefined" for the ParentNode.
Could someone please help me?
TIA,
Sheila
My XML is:
<?xml version="1.0" encoding="utf-8"?>
<x-Root>
<x-Root-description>
<unordered-list bullet-type="circle-filled">
<unordered-list-item><para>For topical dosage form (ointment):
<unordered-list bullet-type="circle-unfilled">
<unordered-list-item><para>For bacterial infections:
<unordered-list bullet-type="asterisk">
<unordered-list-item><para>Adults: Apply one or two times a
day.</para></unordered-list-item>
<unordered-list-item><para>Children: Use is not
recommended.</para></unordered-list-item>
</unordered-list>
</para></unordered-list-item>
<unordered-list-item><para>For viral infections:
<unordered-list bullet-type="asterisk">
<unordered-list-item><para>Adults: Use is not
recommended.</para></unordered-list-item>
<unordered-list-item><para>Children: Use is not
recommended.</para></unordered-list-item>
</unordered-list>
</para></unordered-list-item>
</unordered-list>
</para></unordered-list-item>
</unordered-list>
</x-Root-description>
</x-Root>
I am getting an error while parsing my XML with C#. I need to find the level of each <unordered-list> node in this document. But when I try to read the xmlNode.ParentNode.Name for the Level 2 (or more) node, I receive "Undefined" for the ParentNode.
Could someone please help me?
TIA,
Sheila
My XML is:
<?xml version="1.0" encoding="utf-8"?>
<x-Root>
<x-Root-description>
<unordered-list bullet-type="circle-filled">
<unordered-list-item><para>For topical dosage form (ointment):
<unordered-list bullet-type="circle-unfilled">
<unordered-list-item><para>For bacterial infections:
<unordered-list bullet-type="asterisk">
<unordered-list-item><para>Adults: Apply one or two times a
day.</para></unordered-list-item>
<unordered-list-item><para>Children: Use is not
recommended.</para></unordered-list-item>
</unordered-list>
</para></unordered-list-item>
<unordered-list-item><para>For viral infections:
<unordered-list bullet-type="asterisk">
<unordered-list-item><para>Adults: Use is not
recommended.</para></unordered-list-item>
<unordered-list-item><para>Children: Use is not
recommended.</para></unordered-list-item>
</unordered-list>
</para></unordered-list-item>
</unordered-list>
</para></unordered-list-item>
</unordered-list>
</x-Root-description>
</x-Root>