[xml] use of xmlCopyProp
- From: Callum Gibson <callum_r_gibson yahoo com au>
- To: xml gnome org
- Subject: [xml] use of xmlCopyProp
- Date: Mon, 17 Sep 2007 16:37:53 +1000
Hi all,
Another unexpected one - I'm copying properties now.
xmlCopyProp requires the target node for the copy, but although it sets
the parent of the xmlAttr to the node, it doesn't actually attach the
property to the node at all. Is this correct behaviour? I can't see any
other way to achieve the desired result.
In fact, there doesn't seem to be a way in general to insert a value
into a node's prop list except by adding it from scratch using the text
values with xmlNew[Ns]Prop() or xmlSet[Ns]Prop().
Perhaps the fact that I'm stuffing around in the internals of the tree api
explains why there is no API to do what I want? Nonetheless, xmlCopyProp
seems to be a public function - I'm at a loss to see what you can do with
the xmlAttrPtr it returns once you've called it, since the property
believes it's connected to the node but the node itself knows nothing
about that property so it fails to appear in xmlDocFormatDump output,
for example.
Any suggestions?
--
Callum Gibson @ home
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]