Results 1 to 3 of 3
Aug 16, 2011, 17:12 #1
Parsing an XML Like String in PHP
So I have a string like this:
<note> <url>http://google.com/</url> <notes>Notes about the URL Google</notes> </note> <note> <url>http://yahoo.com/</url> <notes>Notes about Yahoo</notes> </note>
Sorry XML is kind of new to me so i'll write it like I would if it were a SQL Database.
I need to update the notes based on the URL (e.g. UPDATE notes WHERE url='http://google.com')
I also need to detect if a url exists and append to the string if it doesn't exist.
If (Bing) Does not Exist
Then append this to the end of the string: "<note><url>http://bing.com</url><notes>Notes About Bing</notes></note>"
Any ideas on how to do this? It'd be nice if PHP had some built in functions to build and create XML trees like this.
Aug 16, 2011, 18:12 #2
- Join Date
- Feb 2006
- Atlanta, GA, USA
- 46 Post(s)
- 0 Thread(s)
Aug 16, 2011, 18:55 #3
I'm really new to XML, how would I do that?