PDA

View Full Version : XML Write: Support of text nodes and attributes


wellilein
03-16-2007, 02:43 PM
If I'd like to update an attribute, I could select this attribute by the XPath using /Element/@attribute instead of specifying this in the additional text box.

Writing text of an element can be done the same way.
What happens in the current version of VBP if an element has several text nodes? Which text node will be updated?
If I'd like to update the first text node, I could select the text by XPath /Element/text()[0].

kinook
03-19-2007, 07:47 AM
The element will be updated to the specified text (replacing all text and child nodes). It seems unusual to have XML in that format; do you really need to have multiple text nodes and update one of them?

wellilein
03-19-2007, 07:55 AM
Actually I'm updating part of my documentation (the version number and some dates) which is HTML.
In HTML it is very common to have multiple text nodes for one element.

kinook
03-19-2007, 11:39 AM
Using the Replace in File action would probably work better for that.

wellilein
03-19-2007, 12:33 PM
Yes, replace works for me. That's what I'm using instead.