Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-16-2007, 02:43 PM
wellilein wellilein is online now
Registered User
 
Join Date: 11-30-2005
Posts: 53
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].
Reply With Quote
  #2  
Old 03-19-2007, 07:47 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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?
Reply With Quote
  #3  
Old 03-19-2007, 07:55 AM
wellilein wellilein is online now
Registered User
 
Join Date: 11-30-2005
Posts: 53
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.
Reply With Quote
  #4  
Old 03-19-2007, 11:39 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Using the Replace in File action would probably work better for that.
Reply With Quote
  #5  
Old 03-19-2007, 12:33 PM
wellilein wellilein is online now
Registered User
 
Join Date: 11-30-2005
Posts: 53
It's a workaround

Yes, replace works for me. That's what I'm using instead.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 02:33 PM.


Copyright © 1999-2023 Kinook Software, Inc.