Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
06-18-2006, 12:51 AM #1
- Join Date
- Jul 2002
- The Netherlands
- Thanked 0 Times in 0 Posts
SimpleXML: can I perform 'queries'?
I'm looking into the possibilities of xml to store the data for a project I'm currently working on. I started out with SimpleXML, because it seems to me that I won't be doing any complicated stuff. However I can't figure out how to 'perform queries' on the xml-data with SimpleXML.
First let me explain a little bit about my datamodel. I'm working on an invoice application. In invoices.xml I store all the invoices, like so (simplified for reference):
<invoices> <invoice id="01" client="1"> <rule> <description> Description 1 </description> <price> 10 </price> </rule> <rule> <description> Description 2 </description> <price> 20 </price> </rule> </invoice> </invoices>
<clients> <client id="1"> <name> Client name </name> <contact> Contact </contact> <address> Street </address> </client> </clients>
How do I do such a thing? Is it possible to do this with SimpleXML or are the thing I want to do not that *simple*?
Thanx in advance. -Michiel
06-18-2006, 11:34 PM #2
Looks like you're trying to implement a relational database in XML. Don't do that.