Re: xml SAX Parsing in python

2014-12-17 Thread Ian Kelly
On Tue, Dec 16, 2014 at 11:30 PM, Abubakar Roko wrote: > > Good day, > > Please I am new in using python to write program. I am trying to parse an XML document using sax parse and store the parsed result in a tree like defined > below. XNode class define an xml element which has an ID , a tag, a

Re: xml SAX Parsing in python

2014-12-17 Thread Stefan Behnel
Hi, Abubakar Roko schrieb am 17.12.2014 um 07:30: > Please I am new in using python to write program. I am trying to parse an XML > document using sax parse and store the parsed result in a tree like > definedbelow. XNode class define an xml element which has an ID , a tag, a > text value, chi

Re: xml sax

2008-03-19 Thread Timothy Wu
Oh right, why didn't I think of that. =) Many thanks. Timothy On Thu, Mar 20, 2008 at 1:45 AM, Robert Bossy <[EMAIL PROTECTED]> wrote: > Timothy Wu wrote: > > Hi, > > > > I am using xml.sax.handler.ContentHandler to parse some simple xml. > > > > I want to detect be able to parse the content

Re: xml sax

2008-03-19 Thread Robert Bossy
Timothy Wu wrote: > Hi, > > I am using xml.sax.handler.ContentHandler to parse some simple xml. > > I want to detect be able to parse the content of this tag embedded in > the XML. > 174 > > > Is the proper way of doing so involving finding the "Id" tag > from startElement(), setting flag when s

Re: XML: SAX and XInclude

2007-09-11 Thread Laurent Pointal
Stefan Behnel a écrit : > Laurent Pointal wrote: >> does anybody know about an XML parser usable with the sax API (xml.sax) >> and with XInclude feature support (directly or via hacks). > > Try lxml.etree. > > http://codespeak.net/lxml/ > > http://codespeak.net/lxml/tutorial.html > http://codesp

Re: XML: SAX and XInclude

2007-09-10 Thread Stefan Behnel
Laurent Pointal wrote: > does anybody know about an XML parser usable with the sax API (xml.sax) > and with XInclude feature support (directly or via hacks). Try lxml.etree. http://codespeak.net/lxml/ http://codespeak.net/lxml/tutorial.html http://codespeak.net/lxml/api.html#xinclude-and-element

Re: XML SAX parser bug?

2006-02-07 Thread uche . ogbuji
[EMAIL PROTECTED] wrote: > Fredrik Lundh schreef: > > [EMAIL PROTECTED] wrote: > > > I think I ran into a bug in the XML SAX parser. > > > > > > part of my program consist of reading a rather large XML file (about > > > 10Mb) containing a few thousand elements. > > > I have the following problem. S

Re: XML SAX parser bug?

2006-01-19 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > but how do I detect that the parser has split up the characters? I gues > I need to detect it in order to reconstruct the complete string Don't try to detect it. Instead, assume it always happens, and collect the strings in characters(), rather than processing them. Do s

Re: XML SAX parser bug?

2006-01-19 Thread mitsura
Fredrik Lundh schreef: > [EMAIL PROTECTED] wrote: > > > I think I ran into a bug in the XML SAX parser. > > > > part of my program consist of reading a rather large XML file (about > > 10Mb) containing a few thousand elements. > > I have the following problem. Sometimes that SAX parses misreads a

Re: XML SAX parser bug?

2006-01-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I think I ran into a bug in the XML SAX parser. > > part of my program consist of reading a rather large XML file (about > 10Mb) containing a few thousand elements. > I have the following problem. Sometimes that SAX parses misreads a > line. > Let me explain: the XML fil