Boost logo

Boost Users :

From: John Wilkinson (jwilkinson_at_[hidden])
Date: 2007-04-20 10:21:07


It might be better to just strip the comments first. This XSL will do
that:

 

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"

      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

      xmlns:msxsl="urn:schemas-microsoft-com:xslt">

      <!-- Copy everything -->

      <xsl:template match="node() | @*">

            <xsl:copy>

                  <xsl:apply-templates select="@*"/>

                  <xsl:apply-templates/>

            </xsl:copy>

      </xsl:template>

      <!-- Emit nothing for comments -->

      <xsl:template match="comment()">

      </xsl:template>

</xsl:stylesheet>

 

This might or might not be an option for you, but it seems less likely
to introduce problems.

 

John

 

 

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Gerrit Brehmer
Sent: Friday, April 20, 2007 4:48 AM
To: Boost-users_at_[hidden]
Subject: [Boost-users] [Serialization/Archive] Handle comments in
xml-files

 

Hi,

 

can anyone tell me where in the code I can find the place, where I can

disable comment-processing as normal name-value-pairs? Because If I have

xml-comments (<!-- -->) in the xml-file, the deserialization will fail

with a boost::archive::archive_exception.

 

Thanks in advance for your help!

Gerrit

_______________________________________________

Boost-users mailing list

Boost-users_at_[hidden]

http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net