Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-12-2013, 07:51 PM
TOWENS TOWENS is online now
Registered User
 
Join Date: 01-08-2007
Location: Denver
Posts: 5
New XML elements include alias

I'm trying to update an custom TrafficMandatoryFiles element in a TFS 2008 TFSBuild.proj file that's using a namespace as shown below.

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<TrafficMandatoryFiles>newfile</TrafficMandatoryFiles>
</PropertyGroup>
</Project>

I defined an alias as "msbuild" and update the element using "msbuild:Project/msbuild:PropertyGroup/msbuild:TrafficMandatoryFiles" in the XPath which works fine.

My issue is that if the element doesn't exist and it has to add it, it's added with the alias as
<msbuild:TrafficMandatoryFiles xmlns:msbuild="http://schemas.microsoft.com/developer/msbuild/2003"></msbuild:TrafficMandatoryFiles>
which is technically accurate but confusing to novices (like me) to read.

I can clean it up with a Replace in File action but wondered if there's anything I can do in the XML action to prevent it?

While I'm asking, is there any way to keep the Write XML action from making style changes (indentation, white space, in-line comments). It makes a real mess out of multiline elements and comments that were added with leading spaces instead of tabs.

Thanks,
Tom
Reply With Quote
  #2  
Old 09-13-2013, 06:39 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
That's not currently possible in the Write XML action, but we'll look into it, as well as supporting the preserveWhiteSpace property.
Reply With Quote
  #3  
Old 10-09-2013, 04:53 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
These are now supported in v8.5.
Reply With Quote
Reply

Tags
xml alias


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


Copyright © 1999-2023 Kinook Software, Inc.