[xsd-users] Failing to parse XML document generated with the same code.

Juan Pablo Perez juanpablo.perez at gmail.com
Mon Sep 21 09:02:26 EDT 2009


Boris,

Thanks again!

I've tested the example you gave me and works perfectly.
My enviroment is AIX 5.3 using XL C/C++ 7.

I changed my code to this:

	try
	{
		ofstream ofile("test.xml");

		xml_t xml("PAN", "TYPE", 10.50, 9);
		xml_schema::namespace_infomap map;
		map[""].name = "";
		map[""].schema = "xml1.xsd";
		msg(ofile, xml, map);

		ifstream ifile("test.xml");

		auto_ptr<xml_t> xml(msg(ifile, "test.xml"));
	}
	catch (const xml_schema::exception& e)
	{
		cerr << e << endl;
	}

And it writes down a XML file and reads it back ok.
I just can't understand where was the mistake on my previous code, but
now it's working.
Thanks and best regards.

Juan

On Sat, Sep 19, 2009 at 1:13 PM, Boris Kolpackov
<boris at codesynthesis.com> wrote:
> Hi Juan,
>
> Juan Pablo Perez <juanpablo.perez at gmail.com> writes:
>
>> The files are all on the same directory and I don't get any more
>> errors or warning that the ones on my previous email.
>
> Hm, that's getting interesting. Just to make sure that we are
> talking about the same code, can you try this test:
>
> http://www.codesynthesis.com/~boris/tmp/test.tar.gz
>
> I build it like this:
>
> $ xsd cxx-tree --generate-serialization xml1.xsd
> $ g++ *.cxx -lxerces-c
>
> If you still get the errors, can you let me know more about
> your setup (OS, compiler, Xerces-C++ and their versions) so
> that I could try to reproduce this.
>
> Also can you try to run one of the Xerces-C++ examples on
> the output XML, for example:
>
> $ DOMCount -v=always -n -s -f xml1.xml
>
> Boris
>




More information about the xsd-users mailing list