From boris at codesynthesis.com Fri Jul 9 13:49:41 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Jul 9 11:38:56 2010 Subject: [xsde-users] Re: How to serialize with an xml declaration. ? In-Reply-To: References: Message-ID: Hi Hari, In the future please send emails like this to xsde-users@codesynthesis.com instead of xsde-users-owner@... Hari Narni writes: > Hello Boris , > > I' m using the Xsd/e ( embedded codesynthesis) . > Can you please suggest on , how to create an xml content using > serialization with the xml declarations like ( ) in > hybrid mapping. > Because i couldn't find any info from the documentation especially in the > above scenario . The serializer does not add an XML declaration (it is optional) but you can write it yourself to the stream just before calling the serializer. Using the 'library' example, the relevant code would look like this: catalog_s.pre (*c); cout << "" << endl; doc_s.serialize (cout, xml_schema::document_simpl::pretty_print); catalog_s.post (); Boris