Martin, for some reason i was having lots of trouble.
i eventually found out how to do everything i needed, and more, in
PHP5's simplexml.
this tutorial is excellent:
http://www.isolated-designs.net/core...xpath-in-php-5
the author switched from
simplexml_load_file('applications.xml');
to
$apps = simplexml_load_string($xml);
midstream - with no comment. for the newbs, you only need one or the
other - depending on if you are importing a file or working with a
string (included from another file or actually in the same file).
back to my problem, the solution is as simple as:
<?php
$page = simplexml_load_string($xml_string);
$thought = $page->xpath("//thought[@id = 2]");
echo $thought[0]->note;
?>
this should print the note, although i don't have time to test this
code. i did test the code in the tutorial and it worked liked a charm.
thanks for helping - i'm not sure what i was doing to gaff things, but
this method is the simplest around. being a newb, i like that a lot.