[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [JDEV] Well-formed XML.(Correction)



Originally(and still in the current codebase) it works kind of like what
you have below, but the <?xml?> headers are implied.

Where I'm heading with what I've been working on is towards a
communication based on a single document, where each sub-tag is an
exchange between the client and server.  Technologically, it's not going
to make a big difference, but it seems that it's easier to understand when
the protocol "looks" and "acts" like a normal XML document.  Also, with
the entire communication exchange looking like a big document, it should
be easiy to whip up a DTD to verify it or just simply define it.

<?xml version="1.0"?>
<jabber type="client" version="Name/OS version/version"
protocol="19990101">
  <login>
    <user>jeremie</user>
    <pass>Ph0niks</pass>
    <name>jabalot</name>
  </login>
  <status>
    <say type='online'>This is my status</say>
    <priority>10</priority>
    <icon>normal</icon>
  </status>
</jabber>

Jer

On Fri, 19 Feb 1999, Thomas Charron wrote:

> 	A quick correction to something I wrote earlier..  I MEANT if the
> transactions would look like this:
> 
>  <?xml version="1.0"?>
>  <jabber type="client" version="Name/OS version/version"
>  protocol="19990101">
>  <login>
>  	<user>jeremie</user>
>  	<pass>Ph0niks</pass>
>  	<name>jabalot</name>
>  </login>
>  </jabber>
>  <?xml version="1.0"?>
>  <jabber type="client" version="Name/OS version/version"
>  protocol="19990101">
>  <status>
>  	<say type='online'>This is my status</say>
>  	<priority>10</priority>
>  	<icon>normal</icon>
>  </status>
>  </jabber>
> 
> (Notice the xml version declerations multiple times..)  If you are going to
> transaction based XML, adding the xml version statment at the start of each
> XML transaction would allow for a greater flexibility in what XML parser to
> use, as many use this as part of validation..
>