0

I have a file that tells me what to do on runtime.

Notation is as below;

<Service name="Service2">
    <Request>
    <User value="admin">
    <Pass value="1234">
    </Request>

Is it possible to parse it with standard rules, without writing custom parser?

Thanks

erdemgc
  • 11
  • 6

1 Answers1

0

As the above text are in file, you will read it as NSString. After reading the file you can either use some algorithm to fetch the value like, breaking the string into arrays separated by < and >

or, you can create your own parser.

As you dont want to form your custom parser, then you can use the first way to find the values, but that will be fixed for the above file contents.

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140