Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   XML Write: Support of text nodes and attributes (https://www.kinook.com/Forum/showthread.php?t=2393)

wellilein 03-16-2007 02:43 PM

XML Write: Support of text nodes and attributes
 
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

Updating HTML
 
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

It's a workaround
 
Yes, replace works for me. That's what I'm using instead.


All times are GMT -5. The time now is 05:45 PM.


Copyright © 1999-2023 Kinook Software, Inc.