The sources on this page are placed in the Public Domain.

Sample xml (sample.xml):

The parsing script itself; it reads the XML listed above as a file:

Output:

Message: Hello cruel world!
Message: rest