Parsing XML

  • Thread starter Thread starter chance
  • Start date Start date
C

chance

I need to parse this XML

<?xml version = "1.0" encoding="utf-8" ?>
<parms>
<collumn>notice_of_violation.notice_of_violation_id</collumn>
<value>A1000125</value>
</parms>


In particular, I am going to use it to dynamically build a WHERE
clause to be used against my Oracle database.

What I need to figuire out is how to get the type of the node. (Maybe
not using the right language here). For example if I am dealing with a
collumn then I need to also prepend an AND qualifier to my string.

Any help appreciated...
 
chance said:
I need to parse this XML

<?xml version = "1.0" encoding="utf-8" ?>
<parms>
<collumn>notice_of_violation.notice_of_violation_id</collumn>
<value>A1000125</value>
</parms>

The .NET framework offers a lot of ways to parse XML. The simplest is
XmlReader which offers fast forwards only pull parsing. Then there is
XPathDocument/XPathNavigator which builds an in memory tree model of the
complete XML document and allows XPath navigation/value extraction. Then
there is the .NET DOM implementation with XmlDocument which offers DOM
navigation and XPath navigation and also allows you to make changes and
save them back. Finally you can use XML serialization/deserialization.
 
Back
Top