[jdom-interest] questions about org.jdom.ProcessingInstruction
EMorehouse at fool.com
Tue Sep 12 15:22:48 PDT 2000
I've been looking at org.jdom.ProcessingInstruction and have a few questions:
- The "data" portion of a ProcessingInstruction seems to be stored as both a
String and a Map; is this, in fact, the case?
- If so, what is the rationale for this, as opposed to just using one or the
- Would a Map alone suffice to store all the possible "data payloads" a
processing instruction could legally have?
- If so, it seems to me that the Map would be more powerful (and more OO), and
would relieve the application programer from having to do a good deal of String
processing. Does this seem right? Am i missing something?
- There is a constructor that takes a Map and an internal Map already, but there
doesn't seem to be any way to get a Map back out from a ProcessingInstruction;
is this so?
- If yes, what would be the implications of adding a public Map getDataMap()
method to ProcessingInstruction? If there weren't also a shadow data String,
manipulating the Map directly seems like it would be okay and wouldn't cause
corruption. This seems like it would fit in with the philosophy of using Java's
native Collection interfaces to simplify XML programming, as in the case of the
live child List in Element. Does this sound right?
I'd appreciate feedback and comments, especially from Jason and Brett, but also
from anyone with insight into this topic.
- The happiest of people aren't the ones
who always have the best of everything;
they are the ones who always make the best
of everything they have.
Software Engineer/Evil Genius
The Motley Fool
More information about the jdom-interest