Using Spirit library for loading objects from XML

Hi * I am looking to implement some kind of persistence of objects using XML (only simple tags), and I'm wondering whether I can use Spirit library for that. For example, I have the following file: <MyAggregation SomeAttribute="value"> <MyAggregated>Some Value</MyAggregated> </MyAggregation> I know how to implement the parser for getting the structure, so that's not an issue. However, I need a second pass, through the extracted structure, in order to validate it and build the objects. Is this possible by using spirit, or do I have to implement my own library for that? Thank you, Catalin

FYI - the serialization libary uses spirit for parsing XML. Robert Ramey Catalin Pitis wrote:
Hi *
I am looking to implement some kind of persistence of objects using XML (only simple tags), and I'm wondering whether I can use Spirit library for that. For example, I have the following file:
<MyAggregation SomeAttribute="value"> <MyAggregated>Some Value</MyAggregated> </MyAggregation>
I know how to implement the parser for getting the structure, so that's not an issue. However, I need a second pass, through the extracted structure, in order to validate it and build the objects.
Is this possible by using spirit, or do I have to implement my own library for that?
Thank you,
Catalin

Thanks for the information. I will take a look in the serialization code.
Catalin
On 4/14/06, Robert Ramey
FYI - the serialization libary uses spirit for parsing XML.
Robert Ramey
Catalin Pitis wrote:
Hi *
I am looking to implement some kind of persistence of objects using XML (only simple tags), and I'm wondering whether I can use Spirit library for that. For example, I have the following file:
<MyAggregation SomeAttribute="value"> <MyAggregated>Some Value</MyAggregated> </MyAggregation>
I know how to implement the parser for getting the structure, so that's not an issue. However, I need a second pass, through the extracted structure, in order to validate it and build the objects.
Is this possible by using spirit, or do I have to implement my own library for that?
Thank you,
Catalin
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Catalin Pitis
-
Robert Ramey