Parsing an XML Like String in PHP

So I have a string like this:

<notes>Notes about the URL Google</notes>
<notes>Notes about Yahoo</notes>

Here are the ways I need to manipulate the string.

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=‘’)

I also need to detect if a url exists and append to the string if it doesn’t exist.

For example:

If (Bing) Does not Exist

Then append this to the end of the string: “<note><url></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.

So throw an XML header on the thing and parse it with [FPHP]SimpleXML[/FPHP]?

I’m really new to XML, how would I do that?