Hi all,
I'm new to .NET and XML and I have a question. Given an XML file, I want to
navigate its content and look for one or two particular elements to get their
values. At this point, it suffices to open the XML file for read-only access.
Once I have processed these values, I might need to update a bunch of
subelements of a certain element. For example, I may need to update the
Field Name attribute plus the DataField element value in Fields.
<Fields>
<Field Name="EMPLOYEE_ ID">
<DataField>EMPL OYEE_ID</DataField>
<rd:TypeName>Sy stem.Int64</rd:TypeName>
</Field>
<Field Name="LAST_NAME ">
<DataField>LAST _NAME</DataField>
<rd:TypeName>Sy stem.String</rd:TypeName>
</Field>
<Field Name="FIRST_NAM E">
<DataField>FIRS T_NAME</DataField>
<rd:TypeName>Sy stem.String</rd:TypeName>
</Field>
</Fields>
The thing is that I may not need to update this XML file. However, when I
need to, this XML file may be big and my question is whether I should use
XmlDocument for read and write purpose together with XPath expressions? Or
should I use XPathDocument for better performance?
Any other suggestions or ideas?
Thank you very much!