Boost logo

Boost Users :

From: tcmichals (tcmichals_at_[hidden])
Date: 2007-09-11 11:37:43


Added a small patch to basic_xml_grammer.ipp
 NameSpaceMSft = str_p(L"xmlns:xsi") >> Eq >> L'"' >>
str_p(L"http://www.w3.org/2001/XMLSchema-instance") >> L'"' >> S >>
str_p(L"xmlns:xsi") >> Eq >> L'"' >>
str_p(L"http://www.w3.org/2001/XMLSchema") >> L'"' ;

 SerializationWrapper = !S >> str_p(L"<boost_serialization") >> S
   | SignatureAttribute >> S >> VersionAttribute >> !S >> L'>'
   | NameSpaceMSft >> S >> SignatureAttribute >> S >> VersionAttribute >> !S
>> L'>' ;

 and basic_xml_grapper.hpp, added NameSpaceMsft to the rules table
 NameTail,
        AttributeList,
  NameSpaceMSft,
        S;

Now it is is possible to use .NET XmlSerializer to generate and consume
boost XML serialzation data.
"tcmichals" <tcmichals_at_[hidden]> wrote in message
news:fbpns3$laq$1_at_sea.gmane.org...
> Creating an application to send XML formatted data to this class that uses
> boost serialization, the issue is the name spaces in the
> boost_serialization tag; for example shown below...
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE boost_serialization >
> <boost_serialization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> signature="serialization::archive" version="4">...
> looking at the rule for parsing, SerializationWrapper =
> !S
> >> str_p(L"<boost_serialization")
> >> S
> >> SignatureAttribute
> >> S
> >> VersionAttribute
> >> !S
> >> L'>'
> Is there a way to change the rules to allow skipping the namespaces? all
> of the elements are there but there are a few extra? The issue is trying
> to change the XML parser not to generate may not be possible .NET.


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