XML file becomes invalid if dashes in comment

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
joeh
Posts: 5
Joined: Wed Jan 07, 2009 10:16 am

XML file becomes invalid if dashes in comment

Post by joeh » Thu Feb 12, 2009 3:40 pm

One of our users found this problem. He added dashes to his comment when checking in a web.config file and when the History tag updated the file the XML became invalid. Below is an example. The three dashes (the user said it could be 2 or more) highlighted in red below caused the problem.

<!-- $History: /blahblah/Web.config $-->
<!-- -->
<!-- ****************** Version 67 ****************** -->
<!-- User: user Date: 2009-02-12 Time: 16:19:01-05:00 -->
<!-- Updated in: /blahblah -->
<!-- Remove reference to bgi.table363 for subaccount accessible webmethod. -->
<!-- Table363 is to be retired 3/13/2009 --- OBSOLETE-VALID 9X ACCTS FOR MISC -->
<!-- CASH -->
<!-- -->

Regards,
Joe

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: XML file becomes invalid if dashes in comment

Post by lbauer » Thu Feb 12, 2009 5:11 pm

Thanks for the report. What version of Vault are you using?
Linda Bauer
SourceGear
Technical Support Manager

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: XML file becomes invalid if dashes in comment

Post by lbauer » Fri Feb 13, 2009 11:16 am

On further investigation, isn't related to Vault. Comments in XML cannot contain dashes (two or more) except at the
>> beginning (<!--) and end (-->).

http://www.w3.org/TR/REC-xml/#sec-comments
Linda Bauer
SourceGear
Technical Support Manager

Post Reply