OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Parsing XML for direct use by programs

[ Lists Home | Date Index | Thread Index ]
  • From: "John Wilson" <tug@wilson.co.uk>
  • To: <xml-dev@ic.ac.uk>
  • Date: Wed, 4 Nov 1998 16:14:48 -0000

Programs that consume XML generally have to use a two stage process:

1/ Parse the XML
2/ Create new objects to represent the data in the document

(Here I'm thinking of things like EDI applications rather than of XML
browsers. In these cases I have elements which represent dates, amounts of
money, par number, etc. and I need to turn them into the appropriate
internal data structures before my program can process them.)

I have lots of support for step 1 but little or no support for step 2 (I'll
address Bill la Forge's Coins system latter)

What I think I would find helpful is a system which would let me describe
how an XML document which corresponds to a given DTD be converted into an
instances of a particular objects in my particular programming language. Of,
course I'd like to describe this in XML!

To take a concrete example:

There are several ways of expressing a date in various DTDs in use now.
In my Java program I want to deal with instances of java.util.Date.
I don't want to encumber my program with all the hand crafted tedious detail
of turning the XML element into an instance of java.util.Date by hand.

I do want a standard package that reads a DTD an DTD->Java Object mapping
description and an XML document and spits out the object tree that is
understood by my program, not a DOM tree.

Now, as I understand it, Coins can sort of do this but the designer of the
DTD has really to take Coins into account at the beginning. This isn't what
I want to do at all. I want the same DTD to be combined with different
mapping descriptions to produce different object trees and I want different
DTDs to be combined with different mapping descriptions to provide the same
object tree.

Is anybody working on this?
Is it feasible?
Is it useful?

John Wilson
The Wilson Partnership
5 Market Hill, Whitchurch, Aylesbury, Bucks HP22 4JB, UK
+44 1296 641072, +44 976 611010(mobile), +44 1296 641874(fax)
Mailto: tug@wilson.co.uk

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS