Using PHP 5's SimpleXML
Subject:   Neat, but...
Date:   2004-01-16 09:54:22
From:   trachtenberga
Response to: Neat, but...

SimpleXML uses the same parsing functions libxml2 uses to create DOM documents. Yes, you do have the overhead of needing to contain the entire document in memory; however, this is all handled in C, so the process is fast and efficient. (As compared to doing this in PHP.)

The only alternative from a memory perspective is SAX, but SAX can be quite painful to program when your schema is complex. (Try parsing the Apple pList format, for example.)

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Neat, but...
    2004-03-10 12:31:04  riffraff [View]

    what about pull parsing? isn't that both memory efficient and at least easyer to handle than sax ?