0

I am trying to implement a lotto game on the ipod and i need to parse the actual lotto page to get the winning numbers and to put them in an array to compare them with the numbers that the user had entered and find out if he is a winner or not. Can anyone help me with it because really am stuck with it?

Thanks in advance! :)

1 Answer 1

2

What you need is a DOM parser, such as Apple's NSXMLParser.

Specifically you'd want to use XPath parsing to read the value of a specific DOM node on your lotto page's DOM tree.

As iOS does not come with NSXMLDocument (which supports XPath), you'd probably need to do as described here:
Using libxml2 for XML parsing and XPath queries in Cocoa

Other solutions for parsing XML/HTML:
How To Choose The Best XML Parser for Your iPhone Project

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.