Kinook Software Forums

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

Thread Tools Rate Thread Display Modes
Old 12-14-2009, 11:17 AM
Hess_Joel Hess_Joel is offline
Registered User
Join Date: 04-06-2004
Posts: 11
Write XML Element if not exist

I want to query a file for an element with a specific attribute, and if it doesn't exist, add a new element. I keep getting this error:

This name may not contain the '[' character:File-->[<--@FileName='Test']

Attached is an example of what I'm trying,
Attached Files
File Type: bld writexmltest.bld (953 Bytes, 779 views)
Reply With Quote
Old 12-14-2009, 11:32 AM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
So you want the file

<File FileName="PNet.GlobalConstants.dll" From="" To=""/>

to be updated like this?

<File FileName="PNet.GlobalConstants.dll" From="" To=""/>
<File FileName="somefilename.ext" />

The Write XML action doesn't support creating a new element and attribute like that. You could write some script code in a Run Script action to do the specific query and update you want to do.
Reply With Quote

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 12:01 PM.

Copyright 1999-2019 Kinook Software, Inc.