[lxml-dev] getting back RelaxNG tree

Eric Scheidemantle scheie at alum.rpi.edu
Wed Nov 15 20:35:50 CET 2006


>No, not currently. Should be easy to add, though. Just add a method (or
>property?) to the RelaxNG class that retrieves the in-memory tree.
Maybe the
>XMLSchema class could do the same? I'd prefer a string result over
writing to
>a file, BTW. It's easy to write a string to a file, but it's overhead
to read
>in a file when all you wanted is a string.

Certainly, a string is better than writing to a file.

>Oh, and: I assume building an ElementTree from the internal RelaxNG
schema is
>not a good idea, as it could interfere too much with the validation.
Copying
>them first /might/ work, though.

If the RelaxNG class returns a merged XML string, then that could be
passed into the ElementTree parse method for navigation. That seems like
an elegant solution.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20061115/9cb6680b/attachment.htm 


More information about the lxml-dev mailing list