Lists Home |
Date Index |
If you think that's interesting then you should take a look at the XML
serialization technologies in .NET which among other things allow one to
convert class definitions to W3C XML schemas and back. Thus object
instances can be represented as valid XML documents and converted back
and forth as well.
For more information try
For quick and simple code samples try
THINGS TO DO IF I BECOME AN EVIL OVERLORD #51
If one of my dungeon guards begins expressing concern over the
in the beautiful princess' cell, I will immediately transfer him to a
> -----Original Message-----
> From: Simon St.Laurent [mailto:email@example.com]
> Sent: Sunday, March 03, 2002 8:28 AM
> To: Niels Peter Strandberg
> Cc: firstname.lastname@example.org
> Subject: Re: [xml-dev] XML should NOT be a new programming language
> On Sat, 2002-03-02 at 10:22, Niels Peter Strandberg wrote:
> > I want XML in Java!
> While poking around on some other projects this morning, I
> It seems to be running the opposite direction from what Niels
> wants, but it's interesting in its own way. I'm not used to
> seeing "void" in markup.
> <?xml version="1.0" encoding="UTF-8"?>
> <java version="1.0" class="java.beans.XMLDecoder">
> <object class="javax.swing.JFrame">
> <void property="name">
> <void property="bounds">
> <object class="java.awt.Rectangle">
> <void property="contentPane">
> <void method="add">
> <object class="javax.swing.JButton">
> <void property="label">
> <void property="visible">
> The XML syntax uses the following conventions:
> * Each element represents a method call.
> * The "object" tag denotes an expression whose value is
> to be used as the argument to the enclosing element.
> * The "void" tag denotes a statement which will be
> executed, but whose result will not be used as an argument to
> the enclosing method.
> * Elements which contain elements use those elements as
> arguments, unless they have the tag: "void".
> * The name of the method is denoted by the "method" attribute.
> * XML's standard "id" and "idref" attributes are used to
> make references to previous expressions - so as to deal with
> circularities in the object graph.
> * The "class" attribute is used to specify the target of
> a static method or constructor explicitly; its value being
> the fully qualified name of the class.
> * Elements with the "void" tag are executed using the
> outer context as the target if no target is defined by a
> "class" attribute.
> * Java's String class is treated specially and is written
> <string>Hello, world</string> where the characters of the
> string are converted to bytes using the UTF-8 character encoding.
> Simon St.Laurent
> Ring around the content, a pocket full of brackets
> Errors, errors, all fall down!
> The xml-dev list is sponsored by XML.org
> <http://www.xml.org>, an initiative of OASIS
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription