[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: [ Revision #2 ] 15 elementary truths about XML

  • From: "David Lee" <dlee@calldei.com>
  • To: "'Norm Birkett'" <Norm.Birkett@reval.com>, <xml-dev@l...>
  • Date: Thu, 3 Nov 2011 09:01:35 -0700

RE:  [ Revision #2 ] 15 elementary truths about XML
Concrete case:  Java "String" objects do not use "bytes" to encode strings.
They use "16 bit ints".   Atleast at the Java language level.
Of course a level below that is bits.    And one could say 16 bits == 2
bytes ... so maybe this is pedantic.
But I argue its not.    Saying something is encoded in "Bytes" to me emplies
a encoding format such as UTF8 or some such which translates codepoints to a
stream of bytes.
Java strings store the codepoints directly, no encoding or decoding to a
stream of bytes is done unless you write it to a file or byte array.

David A. Lee

-----Original Message-----
From: Norm Birkett [mailto:Norm.Birkett@reval.com] 
Sent: Thursday, November 03, 2011 8:20 AM
To: xml-dev@lists.xml.org
Subject: RE:  [ Revision #2 ] 15 elementary truths about XML

FWIW, I agree with your first point. XML is a human-readable language, as
well as a machine-readable language, and so XML documents and fragments
thereof can exist outside computers.

I'm not sure your example supports your second point, however, because the
memory representation of the XML is in bytes or other such units of storage.
But your whiteboard and paper examples do support your second point, as
would this example: I imagine the string "<wallaby/>".

"Byte" seems to have taken on a broad enough definition in this thread that
it's hard for me to see that any xml in a computer or on optical or magnetic
(or punchcard or ...) media would not be represented in bytes.

Norm Birkett

> -----Original Message-----
> From: David Lee [mailto:dlee@calldei.com]
> Now for my own;  I disagree with this slightly:
> >> 2. As noted above there are no characters in a computer, only
> Thus, "An XML document is a sequence of characters" actually means
> an
> XML document is an abstraction >> of the underlying sequence of bytes.
> To me this implies XML has to be both
> A) On a computer
> B) In a text serialized form in bytes
> B) There is a large body of practice where XML never ends up in text
> serialized form in 'bytes'.    Not referring to Infoset or XDM.   But
> rather
> in-memory "strings" of text serialized XML.
> Say a Java program dynamically creates an XML text message, in a Java 
> String
> and parses it in memory.   No where has it been converted to any
> encoding in
> bytes.
> Yet it is still "XM".
> So I would say more clearly "XML Is an abstraction of a sequence of 
> characters" but not necessarily is there 'underlying bytes'.


XML-DEV is a publicly archived, unmoderated list hosted by OASIS to support
XML implementation and development. To minimize spam in the archives, you
must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org List archive:
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.