Has anybody used the results from DomDocument->get_element_by_id?
I've been experimenting on and off with this extension and have been working on a web based XML editor. I know that it is all still experimental, but some day all of this will work and I want to know how to do it all when the time comes.
If you do use the get_element_by_id, you will need to tell the XML parser what attribute is the ID, simply naming the attribute ID won't work. This bit of code works:
<!DOCTYPE imadethisup [
<!ATTLIST user id ID #REQUIRED>
<!ATTLIST game id ID #REQUIRED> ]>
Just replace the 'user' and 'game' with the appropriate tag names and the id (not the ID) with the appropriate attribute name. Add as many ATTLIST's as you need. I have not tested but I suspect that you could also just use a external DTD too.
I hope that helps someone, and I hope that someone can help me. Once I've found the Node that I'm searching for the function returns a DomElement. Like this:
$result = $dom->get_element_by_id("11");
I can get the node's tag name like this:
echo $results->tagname;
But what I want to get is the value of the node. DomNode->node_value does not return anything.
Does anyone have any idea what I'm doing wrong?
TIA - Phillip Fox