[xml] XPath oddities
- From: "Jon Topper, Active High Ltd." <jon active-high co uk>
- To: xml gnome org
- Subject: [xml] XPath oddities
- Date: Fri, 2 Nov 2001 10:42:27 +0000 (GMT)
I have a document a little like this:
<html>
<head>
<script>
<CC-SCRIPT/>
</script>
</head>
...
</html>
What I'm trying to do is reference the node matching
"/html/head/script/CC-SCRIPT" within that document so that I can exchange
it for a new text node - almost a search-and-replace operation, if you
like.
I've used xmlXPathEval() to evaluate the path expression and then
xmlXPtrBuildNodeList() to build a node list of the results. This node
list doesn't appear to bear any relevance to the matched node in the
original document though - I can't simply use it with xmlReplaceNode(), or
whatever to make the change.
Have I got the wrong end of the stick somewhere? Is what I'm attempting
to do actually possible?
Regards,
Jon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]