473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

python/libxml2dom questions

hi paul...

in playing around with the test python app (see below) i've got a couple of
basic questions. i can't seem to find the answers via google, and when i've
looked in the libxml2dom stuff that i downloaded i didn't see answers
either...

for the list in the "for label in d.xpath" how can i find out the size of
the list???? a simple/basic question, but it's driving me up a wall!!!

also, how can i determine what methods are available for a libxml2dom
object?

thanks...

-bruce
Jul 2 '06 #1
3 2370
"bruce" <be*******@earthlink.netwrote in message
news:ma***************************************@pyt hon.org...
hi paul...

in playing around with the test python app (see below) i've got a couple
of
basic questions. i can't seem to find the answers via google, and when
i've
looked in the libxml2dom stuff that i downloaded i didn't see answers
either...

for the list in the "for label in d.xpath" how can i find out the size of
the list???? a simple/basic question, but it's driving me up a wall!!!
I'm at a loss. Python ships with sample code. libxml2dom ships with sample
code. Somewhere in there must be code that evaluates the length (hint) of a
list.

What search terms are you googling for? The 3rd link returned from Google,
searching for "python list size" is this one.

http://www.brpreiss.com/books/opus7/html/page82.html

Yes, this is a simple/basic question. It is so simple/basic, that it gets
discussed in just about every Python tutorial within the first 3 pages.
also, how can i determine what methods are available for a libxml2dom
object?
Didn't I post a message earlier describing dir and help? You need to do
some basic reading, man!
-- Paul
Give a man a fish and you feed him for a day;
give a man a fish every day and you feed him for the rest of his life.
Jul 2 '06 #2
"bruce" <be*******@earthlink.netwrote:
also, how can i determine what methods are available for a libxml2dom
object?
Have you tried dir(object)? It works great on the command-line
reply-eval-print loop.

-- Barry

--
http://barrkel.blogspot.com/
Jul 2 '06 #3
bruce wrote:
in playing around with the test python app (see below) i've got a couple of
basic questions. i can't seem to find the answers via google, and when i've
looked in the libxml2dom stuff that i downloaded i didn't see answers
either...

for the list in the "for label in d.xpath" how can i find out the size of
the list???? a simple/basic question, but it's driving me up a wall!!!

also, how can i determine what methods are available for a libxml2dom
object?
Obvious question: Why don't you use lxml? It's pretty well documented.

http://codespeak.net/lxml

For the rest of the questions: please read the Python tutorial on python.org.
It's very helpful for beginners.

Stefan
Jul 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ankit | last post by:
Hi I am using libxml2dom package for DOM support in libxml2. There are some test programs in the package when I try to run that samples it give me following error: Traceback (most recent call...
1
by: ankit | last post by:
Hi, I am working with libxml2dom package for having DOM support with libxml2. There are some test examples are given along with the package but when I try to run that, it gives me following...
2
by: ankit | last post by:
I am using libxml2dom but having problem when parsing. It gives me the following error: File "exlibxml2dom.py", line 4, in ? document = libxml2dom.parse("moc.xml") File...
3
by: bruce | last post by:
paul, thanks for the replies to my issues!!! much appreciation. i've got the python app: http://www.boddie.org.uk/python/downloads/libxml2dom-0.3.3.tar.gz and i've downloaded it, an...
0
by: bruce | last post by:
hi paul... in playing around with the test python app (see below) i've got a couple of basic questions. i can't seem to find the answers via google, and when i've looked in the libxml2dom stuff...
0
by: bruce | last post by:
hi... it appears that i'm running into a possible problem with mechanize/browser/python rgarding the "select_form" method. i've tried the following and get the error listed: br.select_form(nr...
2
by: sauce | last post by:
Hi, this a newbie question, forgive me! Ok so I have some code written using the libxml2dom package (because I want to parse html pages) and I would like to have this work on a web server. The web...
3
by: bruce | last post by:
Hi... got a short test app that i'm playing with. the goal is to get data off the page in question. basically, i should be able to get a list of "tr" nodes, and then to iterate/parse them....
1
by: bruce | last post by:
Hi. Got a test web page, that basically has two "<html" tags in it. Examining the page via Firefox/Dom Inspector, I can create a test xpath query "/html/body/form" which gets the target form for...
1
by: bruce | last post by:
hi... i've got the following situation, with the following test url: "http://schedule.psu.edu/soc/fall/Alloz/a-c/acctg.html#". i can generate a list of the tables i want for the courses on the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.