Hi, I have an xml file which represents a number of objects for which I have a class in my application. For example, blogposts:
<blogposts>
<blogpost id="604">
<title>afdghadfh</title>
<body>adfgadfgda</body>
</blogpost>
<blogpost id="605">
<title>dafghadh</title>
<body>afadf</body>
</blogpost>
</blogposts>
I would like to read the xml file using XPath and convert the results to blogpost objects. Is there any simple way to convert the resulting SimpleXMLElement Objects into values for a blogpost object?
Any advice appreciated.
Thanks.