[lxml-dev] Misc questions
Stefan Behnel
stefan_ml at behnel.de
Fri Apr 20 15:49:21 CEST 2007
Hi,
David Soulayrol wrote:
> * How do I generate the XML header in the output ? From documentation, I
> thought write() would do, but I can't get it.
>
> * Is there a way to manage DTDs ? I think I read that something is ready
> in CVS. Is it true ? Note that it could be the moment for me to learn
> XML schemas or Relax NG (which one should I choose ? :) )
Please refer to the in-development docs of lxml:
http://codespeak.net/lxml/dev/
If you then still want to choose, learn RNG.
> * For readability only, is there a way to specify the id that is created
> for each namespace used ?
You mean the namespace prefix? Pass a dictionary to Element()'s "nsmap" argument.
> * At last, I discovered by chance the pretty_print argument of the write
> method. But I did not read anything about this in documentation, nor in
> the pydocs.
It's in there now. See api.txt or api.html respectively. The dev-Version of
the docs will replace the old docs with the next release.
> Is there another interesting source of documentation to get
> complete function signatures (apart from the source) ?
That's a bit tricky to generate from Pyrex source. But you can try help() on a
lot of object's by now. If you still find anything missing from the docs, we'd
appreciate a patch to the text files in the doc directory.
Stefan
More information about the lxml-dev
mailing list