Re: python and xml

2012-05-16 Thread Stefan Behnel
Hi, please don't top-post (I fixed the citation order below). Nibin V M, 16.05.2012 16:30: > On Wed, May 16, 2012 at 7:53 PM, Stefan Behnel wrote: >> Nibin V M, 16.05.2012 16:16: >>> I am trying to use cPanel XML-API and every API call return data in XML >>> format. I would like to know how to m

Re: python and xml

2012-05-16 Thread Nibin V M
thank you Stefan. but the XML output is assigned to a variable; how to process the variable with XML contents? On Wed, May 16, 2012 at 7:53 PM, Stefan Behnel wrote: > Nibin V M, 16.05.2012 16:16: > > I am trying to use cPanel XML-API and every API call return data in XML > > format. I would like

Re: python and xml

2012-05-16 Thread Stefan Behnel
Nibin V M, 16.05.2012 16:16: > I am trying to use cPanel XML-API and every API call return data in XML > format. I would like to know how to manipulate the data here. > > For eg: How can I read the CPU load data from the below output > > > > 0.000.000.00 Here's some untested code to print the

Re: Python and XML Help

2009-04-17 Thread ookrin
On Apr 15, 9:43 am, Scott David Daniels wrote: > ookrin wrote: > > I am still learning. And it's not that I won't take the advice > > for using ElementTree, I just currently don't know anything about it. > > I just didn't want to say, "I have no idea what you're talking about!" > > to Scott c

Re: Python and XML Help

2009-04-15 Thread Scott David Daniels
ookrin wrote: I am still learning. And it's not that I won't take the advice for using ElementTree, I just currently don't know anything about it. I just didn't want to say, "I have no idea what you're talking about!" to Scott cause I figured that would be rude, but I guess so is not saying

Re: Python and XML Help

2009-04-14 Thread John Machin
On Apr 15, 2:25 pm, ookrin wrote: > > > Seeing the errors - I changed the two classes to this: > > class offlineLoad(): >     def loadXmlFile(self): >         print "Loading from File" >         xf = open('CharacterID.xml','r') >         xml = xmlHandler() >         saxparser = make_parser() >    

Re: Python and XML Help

2009-04-14 Thread ookrin
On Apr 14, 8:15 pm, John Machin wrote: > On Apr 15, 12:29 pm, ookrin wrote: > > > > > On Apr 12, 12:51 am, "Diez B. Roggisch" wrote: > > > > ookrin schrieb: > > > > > I'm in the process of learning python and PyQt4. I had decided to make > > > > myself a simple app and soon discovered that I nee

Re: Python and XML Help

2009-04-14 Thread John Machin
On Apr 15, 12:29 pm, ookrin wrote: > On Apr 12, 12:51 am, "Diez B. Roggisch" wrote: > > > > > ookrin schrieb: > > > > I'm in the process of learning python and PyQt4. I had decided to make > > > myself a simple app and soon discovered that I needed to crash into > > > xml to use some of the data

Re: Python and XML Help

2009-04-14 Thread ookrin
On Apr 12, 12:51 am, "Diez B. Roggisch" wrote: > ookrin schrieb: > > > > > I'm in the process of learning python and PyQt4. I had decided to make > > myself a simple app and soon discovered that I needed to crash into > > xml to use some of the data I was going to be getting off of the > > server.

Re: Python and XML Help

2009-04-13 Thread Scott David Daniels
ookrin wrote: I'm in the process of learning python and PyQt4. I had decided to make myself a simple app and soon discovered that I needed to crash into xml to use some of the data I was going to be getting off of the server. I picked up enough xml to use the sax parser to get the data out of th

Re: Python and XML Help

2009-04-12 Thread Diez B. Roggisch
ookrin schrieb: I'm in the process of learning python and PyQt4. I had decided to make myself a simple app and soon discovered that I needed to crash into xml to use some of the data I was going to be getting off of the server. I picked up enough xml to use the sax parser to get the data out of

Re: Python and xml

2008-03-29 Thread Konstantin Veretennicov
On Sat, Mar 29, 2008 at 3:57 PM, Doran, Harold <[EMAIL PROTECTED]> wrote: > I am a python neophyte who has used python to parse through text files > using basic functions and no OOP experience. I have a need to process some > xml files and from what I am now reading python is the exact tool I nee

Re: Python and XML?

2007-04-20 Thread Leonard J. Reder
Stefan, This package is looking better I tried the validation example, but it did not work with 1.3beta so I grabbed 1.2. If objectify works well I think this is a great pick for anyone using xml. Please post to me and the python announce when 1.3 is released. thanks, Len Stefan Behnel wrote:

Re: Python and XML?

2007-04-19 Thread Stefan Behnel
Hi, Leonard J. Reder wrote: > Stefan Behnel wrote: >> http://codespeak.net/lxml/objectify.html > > Looks like this stuff might do what I want. Need to work through the > example. > > Are you the author? Yup! :) > Why is this better then using gnossis? lxml is faster and supports more XML st

Re: Python and XML?

2007-04-15 Thread Leonard J. Reder
Stefan Behnel wrote: > Leonard J. Reder wrote: >> What I as really after though was other possible solutions >> like JAX in the Java world or Gnosis in the Python world. >> >> Something that can take a Relax NG Schema and compile >> it into a bunch of parser/generator objects for handling >> an XML

Re: Python and XML?

2007-04-15 Thread Stefan Behnel
Leonard J. Reder wrote: > What I as really after though was other possible solutions > like JAX in the Java world or Gnosis in the Python world. > > Something that can take a Relax NG Schema and compile > it into a bunch of parser/generator objects for handling > an XML format. That's why I was a

Re: Python and XML?

2007-04-14 Thread Leonard J. Reder
Thanks for the response. This package does look interesting. What I as really after though was other possible solutions like JAX in the Java world or Gnosis in the Python world. Something that can take a Relax NG Schema and compile it into a bunch of parser/generator objects for handling an XML f

Re: Python and XML?

2007-04-14 Thread Stefan Behnel
Leonard J. Reder wrote: > What is the best way to process a Relax NG Schema and auto generate XML > Python parser/generator code? > Any suggestions? Not sure what you mean with "XML Python parser/generator code", but regarding RNG, you should definitely give lxml a try. It may already be what you

Re: Python and XML Schema

2006-01-25 Thread Dennis Benzinger
Trond wrote: > I have a need to, given a XML document with XML Schema defined, to get the > type of each element in the XML file based on the XML Schema URI given. IE, > the element is of simple datatype string. Is there any existing > Python libraries were I can parse the XML file, and for a g