Re: Questions about XML processing?

2020-11-08 Thread Hernán De Angelis
On 2020-11-07 20:03, Dieter Maurer wrote: Hernán De Angelis wrote at 2020-11-6 21:54 +0100: ... However, the hard thing to do here is to get those only when tagC/note/title/string='value'. I was expecting to find a way of specifying a certain construction in square brackets, like [@string='valu

Re: Questions about XML processing?

2020-11-07 Thread Dieter Maurer
Hernán De Angelis wrote at 2020-11-6 21:54 +0100: > ... >However, the hard thing to do here is to get those only when >tagC/note/title/string='value'. I was expecting to find a way of >specifying a certain construction in square brackets, like >[@string='value'] or [@/tagC/note/title/string='value'

Re: Questions about XML processing?

2020-11-07 Thread Hernán De Angelis
No, it is XML metadata. I also believe there should be a better way using [@...] expressions in the path. H. Den lör 7 nov. 2020 13:14Shaozhong SHI skrev: > Hi, Hernan, > > Did you try to parse GML? > > Surely, there can be very concise and smart ways to do these things. > > Regards, > > David

Re: Questions about XML processing?

2020-11-07 Thread Shaozhong SHI
Hi, Hernan, Did you try to parse GML? Surely, there can be very concise and smart ways to do these things. Regards, David On Fri, 6 Nov 2020 at 20:57, Hernán De Angelis wrote: > Thank you Terry, Dan and Dieter for encouraging me to post here. I have > already solved the problem albeit with a

Re: Questions about XML processing?

2020-11-06 Thread Hernán De Angelis
Thank you Terry, Dan and Dieter for encouraging me to post here. I have already solved the problem albeit with a not so efficient solution. Perhaps, it is useful to present it here anyway in case some light can be added to this. My job is to parse a complicated XML (iso metadata) and pick up v

Re: Questions about XML processing?

2020-11-06 Thread Terry Reedy
On 11/6/2020 11:17 AM, Hernán De Angelis wrote: I am confronting some XML parsing challenges and would like to ask some questions to more knowledgeable Python users. Apparently there exists a group for such questions but that list (xml-sig) has apparently not received (or archived) posts since

Questions about XML processing?

2020-11-06 Thread Hernán De Angelis
Hi everyone I am confronting some XML parsing challenges and would like to ask some questions to more knowledgeable Python users. Apparently there exists a group for such questions but that list (xml-sig) has apparently not received (or archived) posts since May 2018(!). I wonder if there are

Re: New to Programming - XML Processing

2015-04-02 Thread Steve Hayes
On Thu, 2 Apr 2015 05:42:18 -0700, Albert-Jan Roskam wrote: > >- >On Wed, Apr 1, 2015 10:00 AM CEST Mark Lawrence wrote: > >>On 01/04/2015 05:27, Andrew Farrell wrote: >>> You should follow Rustom's advice before just diving into the blog post >>> I linked to. Otherwis

Re: New to Programming - XML Processing

2015-04-02 Thread Albert-Jan Roskam
- On Wed, Apr 1, 2015 10:00 AM CEST Mark Lawrence wrote: >On 01/04/2015 05:27, Andrew Farrell wrote: >> You should follow Rustom's advice before just diving into the blog post >> I linked to. Otherwise you risk blindly following things and losing your >> bearings when

Re: New to Programming - XML Processing

2015-04-01 Thread sohcahtoa82
On Wednesday, April 1, 2015 at 3:34:15 PM UTC-7, catperson wrote: > On Tue, 31 Mar 2015 21:17:38 -0700 (PDT), Rustom Mody > wrote: > > >On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote: > >> I am new to programming, though not new to computers. I'm looking to > >> teach myself

Re: New to Programming - XML Processing

2015-04-01 Thread catperson
On Tue, 31 Mar 2015 21:17:38 -0700 (PDT), Rustom Mody wrote: >On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote: >> I am new to programming, though not new to computers. I'm looking to >> teach myself Python 3 and am working my way through a tutorial. At >> the point I'm at in

Re: New to Programming - XML Processing

2015-04-01 Thread Burak Arslan
On 04/01/15 06:27, catperson wrote: > I am new to programming, though not new to computers. I'm looking to > teach myself Python 3 and am working my way through a tutorial. At > the point I'm at in the tutorial I am tasked with parsing out an XML > file created with a Garmin Forerunner and am jus

Re: New to Programming - XML Processing

2015-04-01 Thread Mark Lawrence
On 01/04/2015 05:27, Andrew Farrell wrote: You should follow Rustom's advice before just diving into the blog post I linked to. Otherwise you risk blindly following things and losing your bearings when you run into bugs. Sound advice, but would you please be kind enough to intersperse your an

Re: New to Programming - XML Processing

2015-03-31 Thread Andrew Farrell
You should follow Rustom's advice before just diving into the blog post I linked to. Otherwise you risk blindly following things and losing your bearings when you run into bugs. On Tue, Mar 31, 2015 at 11:17 PM, Rustom Mody wrote: > On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson w

Re: New to Programming - XML Processing

2015-03-31 Thread Andrew Farrell
> I am new to programming, though not new to computers. One quick tip: when starting a new project, it is sometimes is useful to see if others have done the same thing and use their approach to guide yours. In your case, googling "Garmin Forerunner xml python" results in this blog post which is re

Re: New to Programming - XML Processing

2015-03-31 Thread Rustom Mody
On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote: > I'm hoping with enough reading I can experiment and work my way > through the problem and end up with a hopefully clear understanding of > the ElementTree module and Dictionairies. Also: If you are not familiar with dictionar

Re: New to Programming - XML Processing

2015-03-31 Thread Rustom Mody
On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote: > I am new to programming, though not new to computers. I'm looking to > teach myself Python 3 and am working my way through a tutorial. At > the point I'm at in the tutorial I am tasked with parsing out an XML > file created wi

Re: New to Programming - XML Processing

2015-03-31 Thread Ben Finney
catperson writes: > I am new to programming, though not new to computers. I'm looking to > teach myself Python 3 and am working my way through a tutorial. Congratulations! Python 3 is a fine language to be your first. Which tutorial are you following? It may be relevant. > At the point I'm at

New to Programming - XML Processing

2015-03-31 Thread catperson
I am new to programming, though not new to computers. I'm looking to teach myself Python 3 and am working my way through a tutorial. At the point I'm at in the tutorial I am tasked with parsing out an XML file created with a Garmin Forerunner and am just having a terrible time getting my head aro

Re: jython lacks working xml processing modules?

2012-07-18 Thread Matej Cepl
On 18/07/12 05:12, gaodexiaozh...@gmail.com wrote: However,there is one project implemented by Python used PyXML and now my Jython project has to depend on it ,so I am afraid that if Jython doesn't support PyXML,then my jython project can not depend on the original Python project ,then my jython

Re: jython lacks working xml processing modules?

2012-07-17 Thread gaodexiaozheng
在 2012年7月17日星期二UTC+8下午6时02分31秒,Stefan Behnel写道: > Matej Cepl, 17.07.2012 11:39: > > On 17/07/12 10:35, gaodexiaozh...@gmail.com wrote: > >>> > I'm trying to parse an xml file with jython > (not through java > >>> parsers > >>> > like xerces). > > > > https://code.google.com/p/jython-ele

Re: jython lacks working xml processing modules?

2012-07-17 Thread Stefan Behnel
Matej Cepl, 17.07.2012 11:39: > On 17/07/12 10:35, gaodexiaozh...@gmail.com wrote: >>> > I'm trying to parse an xml file with jython (not through java >>> parsers >>> > like xerces). > > https://code.google.com/p/jython-elementtree/ ??? Note that this ships with Jython 2.5. Stefan -- http://ma

Re: jython lacks working xml processing modules?

2012-07-17 Thread Matej Cepl
On 17/07/12 10:35, gaodexiaozh...@gmail.com wrote: > I'm trying to parse an xml file with jython (not through java parsers > like xerces). https://code.google.com/p/jython-elementtree/ ??? -- http://mail.python.org/mailman/listinfo/python-list

Re: jython lacks working xml processing modules?

2012-07-17 Thread Stefan Behnel
gaodexiaozh...@gmail.com, 17.07.2012 10:35: > hi,do you know the PyXML whether can be supported by Jython ? PyXML is a dead project, don't use it. You can use ElementTree in Jython, just as in Python. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: jython lacks working xml processing modules?

2012-07-17 Thread gaodexiaozheng
在 2003年11月24日星期一UTC+8下午7时42分31秒,Paul Boddie写道: > janeaustin...@hotmail.com (Jane Austine) wrote in message > news:;... > > I'm trying to parse an xml file with jython (not through java parsers > > like xerces). > > > > I tried minidom in jython 2.1 a

Re: XML Processing

2008-09-19 Thread Steve Holden
Robert Rawlins wrote: >> Some is going to kick themselves when they realise >> that ElementTree *is* built in to Python 2.5 >> >> http://docs.python.org/whatsnew/modules.html#SECTION000142 > > Tim, Andrii, > > Thanks for the heads up on that! I hadn't noticed they're made it part

Re: XML Processing

2008-09-18 Thread Tim Golden
Robert Rawlins wrote: Some is going to kick themselves when they realise that ElementTree *is* built in to Python 2.5 http://docs.python.org/whatsnew/modules.html#SECTION000142 Tim, Andrii, Thanks for the heads up on that! I hadn't noticed they're made it part of the platform

RE: XML Processing

2008-09-18 Thread Robert Rawlins
> Some is going to kick themselves when they realise > that ElementTree *is* built in to Python 2.5 > > http://docs.python.org/whatsnew/modules.html#SECTION000142 Tim, Andrii, Thanks for the heads up on that! I hadn't noticed they're made it part of the platform modules, that's ex

Re: XML Processing

2008-09-18 Thread Tim Golden
Robert Rawlins wrote: I’m running python 2.5 and currently using ElementTree to perform my XML parsing and creation. ElementTree really is a great package for doing this, however, I’ve been tasked by our deployment guys to try and move away from external libraries where possible as it makes the

Re: XML Processing

2008-09-18 Thread Andrii V. Mishkovskyi
oyment guys to try and move away from > external libraries where possible as it makes their job easier. > > > > Simple question I suppose to start with, does Python have any inbuilt XML > processing modules? If the answer is no then I'll stick with eTree, if > python does have one

XML Processing

2008-09-18 Thread Robert Rawlins
job easier. Simple question I suppose to start with, does Python have any inbuilt XML processing modules? If the answer is no then I'll stick with eTree, if python does have one, then I'll look at some migration steps. Many thanks All, Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Processing

2007-08-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >On Aug 2, 2:09 pm, Jay Loden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > On Aug 2, 1:45 pm, Roman <[EMAIL PROTECTED]> wrote: >> >> Is there a package that converts a string that contains special >> >> characters in xml to

Re: XML Processing

2007-08-02 Thread kyosohma
On Aug 2, 2:09 pm, Jay Loden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Aug 2, 1:45 pm, Roman <[EMAIL PROTECTED]> wrote: > >> Is there a package that converts a string that contains special > >> characters in xml to to literal value. For instance, converts > >> stringhttp://myho

Re: XML Processing

2007-08-02 Thread Diez B. Roggisch
Roman schrieb: > Is there a package that converts a string that contains special > characters in xml to to literal value. For instance, converts string > http://myhome/¶m to http://myhome/¶m. import xml.sax.saxutils print xml.sax.saxutils.escape("I'm a happy & friendly guy, and 1 < 3 - neve

Re: XML Processing

2007-08-02 Thread Jay Loden
[EMAIL PROTECTED] wrote: > On Aug 2, 1:45 pm, Roman <[EMAIL PROTECTED]> wrote: >> Is there a package that converts a string that contains special >> characters in xml to to literal value. For instance, converts >> stringhttp://myhome/¶mtohttp://myhome/¶m. >> >> Thanks in advance > > I've seen ex

Re: XML Processing

2007-08-02 Thread Jay Loden
Robert Dailey wrote: > Both strings in your example are exactly the same, unless I'm missing > something. > > On 8/2/07, Roman <[EMAIL PROTECTED]> wrote: >> Is there a package that converts a string that contains special >> characters in xml to to literal value. For instance, converts string >> h

Re: XML Processing

2007-08-02 Thread kyosohma
On Aug 2, 1:45 pm, Roman <[EMAIL PROTECTED]> wrote: > Is there a package that converts a string that contains special > characters in xml to to literal value. For instance, converts > stringhttp://myhome/¶mtohttp://myhome/¶m. > > Thanks in advance I've seen examples using the HTMLgen module. But

Re: XML Processing

2007-08-02 Thread Robert Dailey
Both strings in your example are exactly the same, unless I'm missing something. On 8/2/07, Roman <[EMAIL PROTECTED]> wrote: > > Is there a package that converts a string that contains special > characters in xml to to literal value. For instance, converts string > http://myhome/¶m to http://myho

XML Processing

2007-08-02 Thread Roman
Is there a package that converts a string that contains special characters in xml to to literal value. For instance, converts string http://myhome/¶m to http://myhome/¶m. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: xml processing speed test

2006-06-07 Thread K.S.Sreeram
Fredrik Lundh wrote: > by using it to split your document into reasonably-sized chunks (one > record, one expression, one text block, one paragraph, etc), and using > Python code to process the chunks. I've updated cElementTree/iterparse implementation to build one full expression at a time. htt

Re: xml processing speed test

2006-06-07 Thread Fredrik Lundh
K.S.Sreeram wrote: > From what i understand, the iterparse interface constructs the xml tree, > but gives you hooks into the tree construction process itself, so that > the programmer can control how much state he wants to retain and how > much state he can discard. > > I wanted the test program

Re: xml processing speed test

2006-06-07 Thread K.S.Sreeram
Fredrik Lundh wrote: > your celementtree example isn't exactly optimal, though... are you sure > you understand how iterparse works? From what i understand, the iterparse interface constructs the xml tree, but gives you hooks into the tree construction process itself, so that the programmer can

Re: xml processing speed test

2006-06-07 Thread Fredrik Lundh
K.S.Sreeram wrote: > All the recent discussions on xml parsing performance got me curious, > and i put together a small speed test for xml processing. your celementtree example isn't exactly optimal, though... are you sure you understand how iterparse works? -- http://mail

xml processing speed test

2006-06-07 Thread K.S.Sreeram
All the recent discussions on xml parsing performance got me curious, and i put together a small speed test for xml processing. The test program was designed to have as minimal state requirements as possible so that efficient 'stream' processing can be done using sax style events.

Re: Desc of packages for XML processing

2005-12-23 Thread Kent Johnson
ankit wrote: > There are various packages availaible for XML processing using python. > So which to choose and when. I summarized some of the features, > advantages and disadvantages of some packages int the following text. > Have a look to it. May this get out of the dillema of choic

Desc of packages for XML processing

2005-12-23 Thread ankit
There are various packages availaible for XML processing using python. So which to choose and when. I summarized some of the features, advantages and disadvantages of some packages int the following text. Have a look to it. May this get out of the dillema of choice. Here we go: OPTIONS

Re: XML processing

2005-11-30 Thread NavyJay
I haven't used PyXML extensively, but I have used parts of the Amara XML Toolkit (http://uche.ogbuji.net/uche.ogbuji.net/tech/4suite/amara/) and recommend it for elegance. I can't say, however, which tool is faster. There are many other XML modules that people have written for Python. Do your re

XML processing

2005-11-30 Thread Doru-Catalin Togea
Hi! I need to do some XML programming, and I have installed the PyXML package. However I read some stuff on the web that using the modules in PyXML is slow and not elegant and it uses up lots of memory, and I don't know what else. Is the current implementation of PyXML legging behind in compar

Re: Idempotent XML processing

2005-08-19 Thread Will McCutchen
> Read up on XML canonicalization (abrreviated as c14n). lxml implements > this, also xml.dom.ext.c14n in PyXML. You'll need to canonicalize on > both ends before hashing. I said normalization but I think canonicalization is the word I was looking for. I wasn't aware that lxml implented it (or th

Re: Idempotent XML processing

2005-08-19 Thread Michael Ekstrand
On Aug 19, 2005, at 1:20 PM, Robert Kern wrote: > Read up on XML canonicalization (abrreviated as c14n). lxml implements > this, also xml.dom.ext.c14n in PyXML. You'll need to canonicalize on > both ends before hashing. > > To paraphrase an Old Master, if you are running a cryptographic hash > over

Re: Idempotent XML processing

2005-08-19 Thread Michael Ekstrand
On Aug 19, 2005, at 12:11 PM, Will McCutchen wrote: >> In my current project, I am working with XML data in a protocol that >> has >> checksum/signature verification of a portion of the document. >> ... >> the server sends me XML with empty elements as full open/close tags, >> but toxml() serializ

Re: Idempotent XML processing

2005-08-19 Thread Robert Kern
Michael Ekstrand wrote: > Hello all, > > In my current project, I am working with XML data in a protocol that has > checksum/signature verification of a portion of the document. There is > an envelope with a header element, containing signature data; following > the header is a body. The signatu

Re: Idempotent XML processing

2005-08-19 Thread Will McCutchen
> In my current project, I am working with XML data in a protocol that has > checksum/signature verification of a portion of the document. > ... > the server sends me XML with empty elements as full open/close tags, > but toxml() serializes them to the XML empty element (), so > the checksum winds

Idempotent XML processing

2005-08-19 Thread Michael Ekstrand
Hello all, In my current project, I am working with XML data in a protocol that has checksum/signature verification of a portion of the document. There is an envelope with a header element, containing signature data; following the header is a body. The signatures are computed as cryptographic c

Re: xml processing

2005-06-02 Thread Jeff Elkins
On Wednesday 01 June 2005 11:01 am, Steven Bethard wrote: > If you're not committed to pyxml, you might consider using ElementTree: > > http://effbot.org/zone/element-index.htm > > I find it *way* easier to work with. Thanks. I've installed it and am experimenting. -- http://mail.python.org/mai

Re: xml processing

2005-06-01 Thread Steven Bethard
Jeff Elkins wrote: > I've like to use python to maintain a small addressbook which lives on a > Sharp > Zaurus. This list will never grow beyond 200 or so entries. I've installed > pyxml. If you're not committed to pyxml, you might consider using ElementTree: http://effbot.org/zone/element-ind

Re: xml processing

2005-06-01 Thread Jeff Elkins
On Wednesday 01 June 2005 09:51 am, Magnus Lycka wrote: > Jeff Elkins wrote: > > I've like to use python to maintain a small addressbook which lives on a > > Sharp Zaurus. This list will never grow beyond 200 or so entries. I've > > installed pyxml. > > > > Speaking generally, given a wxpython app

Re: xml processing

2005-06-01 Thread Magnus Lycka
Jeff Elkins wrote: > I've like to use python to maintain a small addressbook which lives on a > Sharp > Zaurus. This list will never grow beyond 200 or so entries. I've installed > pyxml. > > Speaking generally, given a wxpython app to do data entry, > I'm planning to: > > 1. parse the addres

xml processing

2005-06-01 Thread Jeff Elkins
I've like to use python to maintain a small addressbook which lives on a Sharp Zaurus. This list will never grow beyond 200 or so entries. I've installed pyxml. Speaking generally, given a wxpython app to do data entry, I'm planning to: 1. parse the addressbook file, loading its data into an a