Is XMLObject a good fit for my application?
Although XMLObject is flexible and easy-to-use,
it is no Swiss army knife. Read through the following list of questions to
get better idea of when and when not to use
XMLObject.
- 1.
Is XMLObject one of those drop-in-and-go
programs?
- 2.
Can I use XMLObject to parse HTML or other
arbitrary documents?
- 3.
I need a validating parser. Can XMLObject
help me?
- 4.
My application is speed-critical. Is
XMLObject fast enough?
- 5.
Some of the nodes in my XML hierarchy have unique identifiers. Can I
manipulate these nodes easily with
XMLObject?
1. |
Is XMLObject one of those drop-in-and-go
programs?
| |
No. Before XMLObject can parse an XML
document, you have to craft a parser. Don't fret. This is made easy
with a GUI application, XMLObjApp, included
in the project.
| 2. |
Can I use XMLObject to parse HTML or other
arbitrary documents?
| |
Absolutely not. XMLObject will not
correctly parse HTML or represent the ordering of different child
elements below a given parent element.
XMLObject is a great way to represent the
typical data that you might need to transfer from one application to
another, but it cannot accurately represent a "document".
| 3. |
I need a validating parser. Can XMLObject
help me?
| |
Yes. XMLObject will validate incoming XML.
XMLObject enforces tag attributes, optional
attributes, and patterns of child tags.
| 4. |
My application is speed-critical. Is
XMLObject fast enough?
| |
Maybe. By default, XMLObject will uses the
standard xml.sax library to parse the raw
XML. xml.sax is really, really slow. If you
have pyRXP installed on your system,
XMLObject will use it instead
of xml.sax.
XMLObject with
pyRXP will run faster than
xml.sax, but slower than pure
pyRXP. To get the best speed, you must
trade off some readibility and maintainability.
| 5. |
Some of the nodes in my XML hierarchy have unique identifiers. Can I
manipulate these nodes easily with
XMLObject?
| |
Yes. XMLObject tracks all nodes with unique
identifiers as they are instantiated. These nodes can be easily
located by referencing their ID.
|
|