There is an experimental repository for generateDS at Bitbucket:

        https://dkuhl...@bitbucket.org/dkuhlman/generateds

You will need to use Mercurial in order to clone it.

It's experimental in the sense that there are features there that
are incomplete and even broken.

Currently, the new (incomplete) feature implemented in that
repository is the ability to convert the tree of objects that are
instances of classes generated by generateDS.py (back) into an lxml
tree of DOM nodes.  Logan Own implemented this feature, and I've
helped a little.  So, if you think this will be a useful capability,
as I do, you will have Logan to thank.

You might ask why?  What would we use this for?  Several reasons
that I can think of: (1) lxml enables us to serialize to text;
perhaps this will replace the current export capability someday.
(2) lxml has support for xpath, enabling you to search for nodes
that satisfy a given path or pattern. (3) You can walk the DOM tree
or you can use the find() and findall() functions to find nodes.
(4) lxml has support for XSL-T.  (5) lxml can do validation against
an XML Schema.

As I said, it's experimental and incomplete.  But, it seems to work
well enough so that you can give it a try.  And, as always, let me
know when you find holes in it.

In order to try this new feature, you will need to generate your
classes with the to_etree support turned on.  There is a new command
line option that lets you do that.  The default value of --export is
"write literal", which gives you the export methods that
generateDS.py normally produces.  Add "etree" to get the new
methods.  For example:

--export="write literal etree"
--export="write etree"

etc.

- Dave



--


Dave Kuhlman
http://www.rexx.com/~dkuhlman 

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to