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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XML and Objects

[ Lists Home | Date Index | Thread Index ]
  • From: Mark Baker <mark@conveyor.com>
  • To: David Brownell <db@Eng.Sun.COM>
  • Date: Tue, 29 Sep 1998 09:30:28 -0400

David Brownell wrote:

>         <BEAN CLASS="com.example.foo.SimpleBean">
>             <PROPERTY NAME="prop1" DCD:i4>49</PROPERTY>
>             <PROPERTY NAME="prop2" DCD:string>hello world</PROPERTY>
>             ...
>             </BEAN>
>
> Then reading it back in Java is a case of taking the "CLASS" tag
> and instantiating, then assigning properties.  In C++ it'd need a
> table associating that class with some custom generated C++ stuff.
> Plus of course there are corner cases like wanting to emit strings
> containing characters that are not legal XML -- formfeed, BEL, and
> so on.  (That'd be one reason why when I did such stuff, I didn't
> use DCD.)  Reflection makes stuff like that rather simple to do;
> you can use custom generated code, but don't need to.
>
> That particular solution doesn't require DOM at all.

I'd personally like to see Java packages mapped to namespaces in some manner,
thereby allowing us to do away with Java-specific structures, and just stick to
the content, ala (ignoring the namespace stuff for the moment - I haven't looked
at them recently);

<SimpleBean>
  <prop1 DCD:i4>49</prop1>
  <prop2 DCD:string>hello world</prop2>
</SimpleBean>

I think the most important goal of bidirectional Java/XML interop is in going
*from* XML *to* Java, not the other way around.  As such, asking document authors
to follow a Bean-specific DTD isn't such a good idea.  Network effects are your
friend! 8-)

MB


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