[Zope] XML Parsed for all platforms?

Phil Harris phil.harris@zope.co.uk
Wed, 14 Mar 2001 10:55:48 -0000


I doubt whether they are going to abandon the Win32, but they are develop=
ing
on *nix systems.

I'd imagine they will getting it working on Win32 asap. But not before. ;=
)

Phil
phil.harris@zweb.co.uk

----- Original Message -----
From: "Zanotti Michele" <Zanotti@az.aziendasanitaria.trentino.it>
To: <zope@zope.org>
Sent: Wednesday, March 14, 2001 10:42 AM
Subject: [Zope] XML Parsed for all platforms?


> Ciao,
> I see that XMLParsed 0.1 b3 is only for generic Unix-like platform, whi=
le
> 0.1 b1 and b2 are for all platforms. Do you know if XMLParsed developer=
s
> want to abandon Win platform?
> Thanks, Michele
>
> -----Messaggio originale-----
> Da: Martijn Pieters [mailto:mj@digicool.com]
> Inviato: mercoled=EC 14 marzo 2001 10.50
> A: Jeff Griffith
> Cc: zope@zope.org
> Oggetto: Re: [Zope] Natural XML Parsing
>
>
> On Tue, Mar 13, 2001 at 06:46:42PM -0500, Jeff Griffith wrote:
> > Hey All,
> >
> > While messing around with XML I became really frustrated at how
unnatural
> it
> > seemed to extract data out of documents.  I ended up writing my own
python
> > class to do exactly what felt natural.  The problem is the entire tim=
e I
> > kept telling myself "this code has to already exist somewhere"  I jus=
t
> could
> > never find it.
> >
> > So if anyone is interested take a look at how this class works and te=
ll
me
> > if
> > 1) this seems useful
> > 2) this is already supported by someone else
> >
> > A brief example of how it is used
> > --------------
> >
> > < collection >
> >   < comic issue=3D"1">
> >      < author > Stan Lee < /author >
> >   < /comic >
> > < /collection >
> >
> > can be accessed as
> >
> > collection.comic.author.TEXT
> > collection.comic.ATTR('issue')
> > ---------------
> > a more complete write-up w/source is available at
> > http://www.people.hbs.edu/jgriffith/simplexmlobject.html
>
> Have you looked at ParsedXML?
>
>   http://www.zope.org/Wikis/DevSite/Projects/ParsedXML/Releases
>
> It is a fully DOM level 2 compliant XML object. It'll let you access yo=
ur
> XML via DOM calls. They may seem less convenient than your example, but
> will cover the cases where you have more than one 'comic' element.
>
> Your example could translate to:
>
>   xmlDoc.documentElement.childNodes[0].childNodes[0].childNodes[0]
>   xmlDoc.documentElement.childNodes[0].getAttribute('issue')
>
> or by using the tagname the first example would become:
>
>   comic =3D xmlDoc.documentElement.getElementsByTagName('comic')[0]
>   authorName =3D comic.getElementsByTagName('author')[0].getChildNodes(=
0)
>
> In future versions, XML id support is planned; if you have a DTD that
> tells the parser what attributes are Id's, you can traverse the
> tree using Id attributes for the same effect. Then you can use a docume=
nt
> like:
>
>   <collection>
>     <comic issue=3D"1" id=3D"first_issue">
>        <author>Stan Lee</author>
>     </comic>
>   </collection>
>
> and code like:
>
>   comic =3D xmlDoc.getElementById('first_issue')
>   authorName =3D comic.getElementsByTagName('author')[0].getChildNodes(=
0)
>
> Hope this helps!
>
> --
> Martijn Pieters
> | Software Engineer  mailto:mj@digicool.com
> | Digital Creations  http://www.digicool.com/
> | Creators of Zope   http://www.zope.org/
> ---------------------------------------------
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )