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
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
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
definedbelow. XNode class define an xml element which has an ID , a tag, a text
value, children element and a parent element
Chris Rebert wrote:
> On Fri, Jan 23, 2009 at 11:19 AM, aha wrote:
>> I've been charged with developing an XML configuration file format,
>> for one of the applications that my company develops.
>> [...]
>> I am still trying to determine the
>> best XML parser API to use. I would love to use XPAT
On Fri, Jan 23, 2009 at 11:19 AM, aha wrote:
> Hello All,
> I've been charged with developing an XML configuration file format,
> for one of the applications that my company develops. (Yes, I know it
> would have been easier to just use the configuration file format as
> described in RFC 822) W
Hello All,
I've been charged with developing an XML configuration file format,
for one of the applications that my company develops. (Yes, I know it
would have been easier to just use the configuration file format as
described in RFC 822) While I am finally comfortable with the XML
description
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
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
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 seeing one, and in characters(),
when s
Hello,
Can any one help for error in following code.
actually i want to map parent element with child element, but i am unable to
do so.
here is the code which i am trying for please do reply if iam not on right
track.
import xml.sax.handler
class BookHandler(xml.sax.handler.ContentHandler):
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
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
[python 2.5, Linux Mandriva 2007.1]
Hello,
does anybody know about an XML parser usable with the sax API (xml.sax)
and with XInclude feature support (directly or via hacks).
With specifying nothing (default parser), it simply transmit xinclude
elements (i tried to call parser on included file
[EMAIL PROTECTED] schrieb:
> Is there a Pythonic way to read the file and identify any illegal XML
> characters so I can strip them out? this would keep my program more
> flexible - if the vendor is going to allow one illegal character in
> their document, there's no way of knowing if another one w
Thanks, I'll work with the file on the file system, then parse it with
SAX.
Is there a Pythonic way to read the file and identify any illegal XML
characters so I can strip them out? this would keep my program more
flexible - if the vendor is going to allow one illegal character in
their document,
[EMAIL PROTECTED] schrieb:
> My original posting has a funky line break character (it appears as an
> ascii square) that blows up my program, but it may or may not show up
> when you view my message.
Looking at your document, it seems that this "funky line break
character" is character \x1E, which
My original posting has a funky line break character (it appears as an
ascii square) that blows up my program, but it may or may not show up
when you view my message.
I was afraid to use element tree, since my xml files can be very long,
and I was concerned about using memory structures to hold al
What exactly is invalid about the XML fragment you provided?
It seems to parse correctly with ElementTree:
>>> from xml.etree import ElementTree as ET
>>> e = ET.fromstring("""
...
...
... Tampa
... A great city ^^ and place to live
...
...
... Clearwater
... Beautiful be
I've got an XML feed from a vendor that is not well-formed, and having
them change it is not an option. I'm trying to figure out how to
create an error-handler that will ignore the invalid token and continue
on.
The file is large, so I'd prefer not to put it all in memory or save it
off and strip
[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
Thanks for the feedback!
I will certainly look at the elementtree stuff (I am new to Python so I
still need to find my way around)
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I need to read a simle XML file. For this I use the SAX parser. So far
> so good. The XML file consist out of number of "Service" object with
> each object a set of attributes.
> The strange thing is that for some reason, the attributes for all the
> objects are being u
Hi,
I need to read a simle XML file. For this I use the SAX parser. So far
so good.
The XML file consist out of number of "Service" object with each object
a set of attributes.
I read through the XML file and for each "" entry I create a
new service object.
When I am in the "" part of the XML fil
[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
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
[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.
> Le
Hi,
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 file contains a few thousand lines
27 matches
Mail list logo