[xsd-users] xsd cxx-tree --generate-serialization

ss ak ssak22 at gmail.com
Wed Aug 26 17:48:56 EDT 2009


xsd cxx-tree --generate-serialization test.xsd

This type of method is not generated when i use

void
hello (std::ostream&,
       const hello_t&,
       const xml_schema::namespace_infomap& =
         xml_schema::namespace_infomap ());


As in
http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#2.5

While parsing and accessing the XML data may be everything you need, there
are applications that require creating new or modifying existing XML
documents. By default XSD does not produce serialization code. We will need
to request it with the --generate-serialization options:

$ xsd cxx-tree --generate-serialization hello.xsd


If we now examine the generated hello.hxx file, we will find a set of
overloaded serialization functions, including the following version:

void
hello (std::ostream&,
       const hello_t&,
       const xml_schema::namespace_infomap& =
         xml_schema::namespace_infomap ());



More information about the xsd-users mailing list