[jdom-interest] Jython & JDOM

rpcee rpcee at operamail.com
Sun Jul 7 11:25:27 PDT 2002


you just use it. eg interactive prompt assuming jdom.jar is in your classpath

$ jython
Jython 2.1 on java1.3.1 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from org.jdom import Element
>>> myel=Element('root')
>>> myel.addContent(Element('child1'))
[Element: <root/>]
>>> myel.addContent(Element('child2'))
[Element: <root/>]
>>> print myel
[Element: <root/>]
>>> print myel.children
[[Element: <child1/>], [Element: <child2/>]]

you can use any standard java classes from jython, there's 2 books on the subject

cheers, Rich


-- 
_______________________________________________
Download the free Opera browser at http://www.opera.com/

Free OperaMail at http://www.operamail.com/

Powered by Outblaze



More information about the jdom-interest mailing list