dc

dc

  • NA
  • 663
  • 0

C# parsing a file

Aug 23 2012 11:51 PM
In a C# 2010 application that I will be writing, I am trying to decide if I should use regular expression or use a parsing routine to get to the nodes of an xml file I will be working with.

The xml file I receive is not to update my database locally. My response will update the database on the remote site.


Basically I will be obtaining an xml file from a remote web service. When I look at all the results that this web service gives to me, I can uniquely identify patterns in the data that would be appropirate for regular expressions.

However there will be times when I obtain a list of key values that occurs 1 to 500 times. Thus i am wondering if this type of parsing is possible using regular expressions. If so, how would I do that type of parsing with regular expressions?

Also, can you tell me and/or point me to a reference that will tell me how to accomplish this task, using a built in xml parser or code that shows how to parse xml?