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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: JavatoXML utility?

[ Lists Home | Date Index | Thread Index ]
  • From: Mehran <mmm@medgrid.philips.com>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 27 May 1998 18:04:03 -0400


I am looking for a utility that will convert an actual object to XML.

Consider a class:

public class Name {
  public string firstName;
  public string lastName"

  public Name() {
    firstName="John";
    lastName="Smith";
  }
}

Suppose we have an instance "myName" of "Name". Suppose the utility is called 
"JavatoXML" and has a method called "convert".

xml = new JavatoXML();
xml.convert(myName);

I am looking for a utility that will then output:

<Name>
  <firstName>John</firstName>
  <lastName>Smith</lastName>
</Name>


Thanks
Mehran
Email: mmm@medgrid.philips.com

At 05:20 PM 5/27/98 -0400, Jacek Ambroziak - Sun Microsystems Labs BOS wrote:
>I have an XML JavaDoc utility which generates XML from documentation
>(instead of HTML). Otherwise it is not quite clear if you mean
>XMLing class definitions or actual objects. With objects
>the situation is more complex as you'll need to do something
>about inherited members, etc.
>
>Regards,
>
>--Jacek Ambroziak
>
>
>> Hi
>> 
>> Is there a public utility out there that converts a Java Object to an
>> XML document using reflection or any other means?
>> 
>> Consider a class:
>> 
>> public class Name {
>>   public string firstName;
>>   public string lastName"
>> 
>>   public Name() {
>>     firstName="John";
>>     lastName="Smith";
>>   }
>> }
>> 
>> I am looking for a utility that will automatically generate the output:
>> 
>> <Name>
>>   <firstName>John</firstName>
>>   <lastName>Smith</lastName>
>> </Name>
>> 
>> 
>> Anyone know of such a utility?
>> 
>> Thanks
>> Mehran
>> Email: mmm@medgrid.philips.com
>> 
>> 
>> 
>> 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)
>> 
>
>
>
>


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