YAXPAPI (Yet Another XML Parser API)- an XDEV proposal
Don Park
donpark at quake.net
Sun Dec 14 00:09:37 GMT 1997
>Hmm, your proposal is coherent, but why is it better? It's certainly a
>bit more complex than what I proposed, and I'd need to see evidence that
>my proposal fails to meet the needs of the basic application programmer.
>From the parser writer's point of view, they would rather create their own
object model than changing the code to produce W3C DOM objects which will be
incompatible with the version deployed in IE 4.0. My proposal allows
parsers like MSXML to remain unchanged and still support W3C DOM.
Furthermore it allows application programmers to access MSXML objects for
features not supported by W3C DOM.
public class XmlObject {
Object peer;
public Object getPeer () { return peer; }
}
public class XmlDocument extends XmlObject { ... }
XmlDocument obj;
Object peer = obj.getPeer();
if (peer instanceof com.ms.xml.om.Document) {
com.ms.xml.om.Document elem = (com.ms.xml.om.Document)peer;
elem.setOutputStyle(XMLOutputStream.PRETTY);
...
My proposal makes it easier for parser writers to support the standard API
and it does not limit applications programmers to the functionalities in the
standard API. I have designed object-oriented software for fifteen years
and I have learned from past mistakes that, while what I propose might seem
more complex, it will meet the harsh reality of the marketplace better.
>One of the things I did with Lark was hook it up to the Swing Tree
Renderer/
>JTree package, got a nice little XML document tree-walker, even works with
>Unicode fonts; I only needed calls like the ones I outlined and it was
>no big deal. - Tim
The reason I mentioned Swing's TreeModel was to point out the way it allows
any tree structure to be used as model for JTree. It is true that you can
use JTree's default model but then you end up with two models: XML document
tree and JTree's default model tree which is resource intensive.
Don
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list