Xmi parser

Harry George hgg9140 at seanet.com
Sun Feb 3 11:00:30 EST 2002


"Bruno Liénard" <lienard.bruno at free.fr> writes:

> Yes I know, but given the complexity of the DTD and the number of tags and
> attributes, I think it is quite a lot of work, so if anybody had already
> done it... I need a parser that can read a XMI file and create the
> corresponding objects.  I have tried with xml_objectify, but it doesn't
> work. I didn't spend a lot of time to understand why..
> 
> Regards,
> 
> Bruno
> 
> 

You can check out pycase at:
   http://www.seanet.com/~hgg9140/comp/index.html

In the package is a copy of the UMLXMI DTD, and a program which
converts that to python classes which know how to write themselves out
to xml.  The program (xmidtd2py.py) could be extended to read xml as
well.  

This is very alpha -- it was good enough for the uses I have, but no
claims of completeness or cor4rectness, etc.

> 
> 
> "Martin v. Loewis" <martin at v.loewis.de> a écrit dans le message news:
> m31yg49lyn.fsf at mira.informatik.hu-berlin.de...
> > "Bruno Liénard" <lienard.bruno at free.fr> writes:
> >
> > > I am looking for a xmi parser. Does anybody here have already
> > > written one ?
> >
> > Given that XMI is an XML application, any XML parser should be able to
> > parse XMI. I recommend xml.parsers.expat (or the SAX and DOM wrappers
> > around it).
> >
> > Regards,
> > Martin
> >
> 
> 

-- 
Harry George
hgg9140 at seanet.com



More information about the Python-list mailing list