What XML lib to use?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fredrik Lundh

    #16
    Re: What XML lib to use?

    Paul Boddie wrote:
    [color=blue][color=green]
    >> For stand-alone XML manipulation in Python, my point still stands:
    >> programs using DOM and SAX are more bloated and slower than
    >> the alternatives.[/color]
    >
    > Your point was that "there are no *sane* reasons to use SAX or DOM in
    > Python", which actually isn't true.[/color]

    I replied in the context of this thread. If you chose to ignore the
    context, or if you're not capable of reading and understanding the
    posts you're replying to, that's your problem.

    </F>



    Comment

    • Robert Kern

      #17
      Re: What XML lib to use?

      Fredrik Lundh wrote:[color=blue]
      > Paul Boddie wrote:
      >[color=green][color=darkred]
      >>>For stand-alone XML manipulation in Python, my point still stands:
      >>>programs using DOM and SAX are more bloated and slower than
      >>>the alternatives.[/color]
      >>
      >>Your point was that "there are no *sane* reasons to use SAX or DOM in
      >>Python", which actually isn't true.[/color]
      >
      > I replied in the context of this thread. If you chose to ignore the
      > context, or if you're not capable of reading and understanding the
      > posts you're replying to, that's your problem.[/color]

      His interpretation of your words is a perfectly valid one even in the
      context of this thread. "in Python" explicitly provides a context for
      the rest of the sentence. In English, at least, it is perfectly
      reasonable to presume that explicit contexts override implicit ones.

      --
      Robert Kern
      rkern@ucsd.edu

      "In the fields of hell where the grass grows high
      Are the graves of dreams allowed to die."
      -- Richard Harter

      Comment

      • Fredrik Lundh

        #18
        Re: What XML lib to use?

        Robert Kern wrote:
        [color=blue]
        > His interpretation of your words is a perfectly valid one even in the
        > context of this thread. "in Python" explicitly provides a context for
        > the rest of the sentence.[/color]

        Exactly. "in Python", not "in an application with an existing API".

        (also, if the OP had been forced to use an existing API by external
        constraints, don't you think he would have mentioned it?)
        [color=blue]
        > In English, at least, it is perfectly reasonable to presume that explicit
        > contexts override implicit ones.[/color]

        Letting a part of a sentence override the context of the discussion is
        perhaps popular in certain tabloid journalist circles, and among slash-
        dot editors and US political bloggers, but most people do in fact have
        a context buffer memory that can hold more than a few words. (how
        come you're so sure I wasn't talking about, say, the Python Lisp com-
        piler? or the Monty Python sketch with the sadistic Belgian instrument-
        making monk? or a Harry Potter book?)

        I know what I meant. You know what I meant. Paul knows what I
        meant. If you still want to play the "but there is a way to interpret
        this in another way" game, file a bug report against the python.org
        "what is python?" summary page.

        </F>



        Comment

        • Paul Boddie

          #19
          Re: What XML lib to use?

          Fredrik Lundh wrote:[color=blue]
          > Robert Kern wrote:[color=green]
          > > His interpretation of your words is a perfectly valid one even in the
          > > context of this thread. "in Python" explicitly provides a context for
          > > the rest of the sentence.[/color]
          >
          > Exactly. "in Python", not "in an application with an existing API".[/color]

          Well, if you're still not convinced that DOMs exist outside monolithic
          applications... ;-)
          [color=blue][color=green]
          > > In English, at least, it is perfectly reasonable to presume that explicit
          > > contexts override implicit ones.[/color]
          >
          > Letting a part of a sentence override the context of the discussion is
          > perhaps popular in certain tabloid journalist circles, and among slash-
          > dot editors and US political bloggers, but most people do in fact have
          > a context buffer memory that can hold more than a few words.[/color]

          I don't really see how an absolutely-qualified complete sentence...

          Q> since there are no *sane* reasons to use SAX or DOM in Python,
          Q> that's mainly a job security issue...

          ....can somehow be qualified by the preceding discussion, when the only
          ambiguous context is "that" == "good for learning things". It's an
          absolute statement of opinion! (And yes, I think we all agree on what
          "Python" is.)
          [color=blue]
          > I know what I meant. You know what I meant. Paul knows what I
          > meant.[/color]

          I actually do know what you mean, but that doesn't mean that the
          statement in question wasn't misleading, especially to people who
          aren't familiar with or accustomed to discovering this missing context.
          It's like saying "there are no *sane* reasons to drive a Volvo",
          possibly in a follow-up to a discussion about how bad Volvos are
          compared to Saabs. There may well be a sane reason to drive a Volvo,
          but the statement doesn't allow for the possibility, unless in the hunt
          for the missing context you're willing to take the term "significan t
          whitespace" to a whole new level.

          Paul

          Comment

          • Giovanni Bajo

            #20
            Re: What XML lib to use?

            Fredrik Lundh wrote:
            [color=blue]
            > Edvard Majakari wrote:
            >[color=green]
            >> Using a SAX / full-compliant DOM parser could be good for learning
            >> things, though. As I said, depends a lot.[/color]
            >
            > since there are no *sane* reasons to use SAX or DOM in Python, that's
            > mainly a job security issue...[/color]


            One sane reason is that ElementTree is not part of the standard library. There
            are cases where you write a simple python script of 400 lines and you want it
            to stay single-file. While ElementTree is very easy to distribute (for basic
            features it's just a single file), it still won't fit some scenarios.

            So, why did it not make it to the standard library yet, given that it's so much
            better than the alternatives?
            --
            Giovanni Bajo


            Comment

            Working...