Re: [pyxb-users] Help with XML generation

2010-07-07 Thread Peter Bigot
Ah; all mine did (probably) was add the attribute to the document tag; it didn't have any effect on the generated XML. So the feature won't do anything for your case, and the solution you used is the correct one (unless I pass unrecognized keywords on to the DOM layer, which would be an appropriat

Re: [pyxb-users] Help with XML generation

2010-07-07 Thread David Hrbáč
Dne 3.7.2010 15:01, Peter Bigot napsal(a): > Great. > > To put the encoding in the generated document, the best way is to go through > the DOM stage explicitly: > > dom = dp.toDOM() > dom.documentElement.setAttribute('encoding', 'UTF-8') > print dom.toxml() Peter, Your suggestion didn't work for

Re: [pyxb-users] Help with XML generation

2010-07-03 Thread Peter Bigot
Great. To put the encoding in the generated document, the best way is to go through the DOM stage explicitly: dom = dp.toDOM() dom.documentElement.setAttribute('encoding', 'UTF-8') print dom.toxml() If you would, please file a request on the PyXB trac server https://sourceforge.net/apps/trac/pyx

Re: [pyxb-users] Help with XML generation

2010-07-03 Thread David Hrbáč
> 1. How can I add information about encoding, I'd like to have it utf8. > > > 2. How can I work with utf8 characters within my script? It doesn't work for > me. > My test is: > ivh.text = 'Unicode test ěščřžýáíé' This solves my problem with Unicode characters. ivh.text = u'Unicode test ěščřžýá

Re: [pyxb-users] Help with XML generation

2010-07-02 Thread David Hrbáč
> Původní zpráva > Od: Peter Bigot > Předmět: Re: [pyxb-users] Help with XML generation > Datum: 03.7.2010 02:32:44 > > It's harder with your schema because the elements are defined within the > complex t

Re: [pyxb-users] Help with XML generation

2010-07-02 Thread Peter Bigot
It's harder with your schema because the elements are defined within the complex types, rather than globally where they can be referenced by their element name (as they appear in the document) If you want to create the inner elements independently, you can do so using their type, as with inv.invoi

[pyxb-users] Help with XML generation

2010-07-02 Thread David Hrbáč
Hi, I'm trying to produce this XML: http://www.stormware.cz/schema/data.xsd"; xmlns:inv="http://www.stormware.cz/schema/invoice.xsd"; xmlns:vch="http://www.stormware.cz/schema/voucher.xsd"; xmlns:int="http://www.stormware.cz/schema/intDoc.xsd"; xmlns:typ="http://www.sto