python/libxml2dom questions

Discussion in 'Python' started by bruce, Jul 2, 2006.

  1. bruce

    bruce Guest

    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
    bruce, Jul 2, 2006
    #1
    1. Advertising

  2. bruce

    Paul McGuire Guest

    "bruce" <> wrote in message
    news:...
    > 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.
    Paul McGuire, Jul 2, 2006
    #2
    1. Advertising

  3. bruce

    Barry Kelly Guest

    "bruce" <> wrote:

    > 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/
    Barry Kelly, Jul 2, 2006
    #3
  4. 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
    Stefan Behnel, Jul 2, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ankit

    problem with libxml2dom

    ankit, Dec 27, 2005, in forum: Python
    Replies:
    0
    Views:
    273
    ankit
    Dec 27, 2005
  2. ankit

    problems with libxml2dom

    ankit, Dec 27, 2005, in forum: Python
    Replies:
    1
    Views:
    538
    Paul Boddie
    Jan 4, 2006
  3. ankit

    libxml2dom problems

    ankit, Dec 27, 2005, in forum: Python
    Replies:
    2
    Views:
    627
    ankit
    Dec 28, 2005
  4. bruce

    python/libxml2dom questions

    bruce, Jul 2, 2006, in forum: Python
    Replies:
    0
    Views:
    352
    bruce
    Jul 2, 2006
  5. bruce
    Replies:
    2
    Views:
    444
    Paul Boddie
    Sep 2, 2008
Loading...

Share This Page