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


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] XML should NOT be a new programming language

[ Lists Home | Date Index | Thread 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


If one of my dungeon guards begins expressing concern over the
in the beautiful princess' cell, I will immediately transfer him to a
people-oriented position.

> -----Original Message-----
> From: Simon St.Laurent [mailto:simonstl@simonstl.com] 
> Sent: Sunday, March 03, 2002 8:28 AM
> To: Niels Peter Strandberg
> Cc: xml-dev@lists.xml.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 
> found: 
> http://java.sun.com/j2se/1.4/docs/api/java/beans/XMLEncoder.html
> 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">
> <string>frame1</string>
> </void>
> <void property="bounds">
> <object class="java.awt.Rectangle">
> <int>0</int>
> <int>0</int>
> <int>200</int>
> <int>200</int>
> </object>
> </void>
> <void property="contentPane">
> <void method="add">
> <object class="javax.swing.JButton">
> <void property="label">
> <string>Hello</string>
> </void>
> </object>
> </void>
> </void>
> <void property="visible">
> <boolean>true</boolean>
> </void>
> </object>
> </java>
>  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!
> http://simonstl.com
> -----------------------------------------------------------------
> 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
manager: <http://lists.xml.org/ob/adm.pl>


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

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