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

RE: Never mind the browser, let's do MicroXML

  • From: "David Lee" <dlee@calldei.com>
  • To: "'Michael Sokolov'" <sokolov@ifactory.com>, "'Michael Kay'" <mike@s...>
  • Date: Sat, 18 Dec 2010 10:18:52 -0500

RE:  Never mind the browser
There's all sorts of glue to hook up XMLStreamWriter to XMLEventWriter to
XMLStreamReader to XMLEventWriter
Some not so obvious but if you poke around you'll find almost everything you
need, and if not I've implemented some missing pieces, just ask.

StAXUtils has all this nifty glue

http://java.net/projects/stax-utils/

One of many fun functions


javanet.staxutils.XMLStreamUtils.copy(XMLStreamReader reader,
XMLStreamWriter writer)

There's also thead save event pippes, all sorts of adaptors and wrappers,
it's a regular christmas party of toys.




----------------------------------------
David A. Lee
dlee@calldei.com
http://www.xmlsh.org

-----Original Message-----
From: Michael Sokolov [mailto:sokolov@ifactory.com] 
Sent: Saturday, December 18, 2010 9:15 AM
To: Michael Kay
Cc: xml-dev@lists.xml.org
Subject: Re:  Never mind the browser, let's do MicroXML


On 12/18/2010 8:05 AM, Michael Kay wrote:
>
>>
>> PS: probably everyone on this list is already aware of this, but SAX 
>> stands for Simple API for XML.  To support MicroXML, we would want an 
>> even simpler one; Micro-API: MAX? uAX?.
>
> Have you tried XMLStreamWriter? As an event-based push API, it's a 
> delight to use compared to SAX, whether you're sending or receiving.

As it turns out I only very recently implemented some xml-aware 
full-text indexing using woodstox; as you say, I was drawn to it because 
I needed a pull parser.  So I worked with XMLStreamReader. It wasn't 
obvious to me how to use XmlStreamWriter as an event-base push API.  I 
guess one could implement an event sink as an XmlStreamWriter, but then 
what?  Is there some existing glue to connect a Reader to a Writer, or 
does one need to implement that?

Also, to return to the point in my original post: it wasn't so much a 
criticism of SAX, as much as to say that folks working with a simplified 
document format might prefer to have a simplified API that isn't 
peppered with hooks for legacy (XML 1.0) features.  But is it really 
worth the trouble to produce new micro- versions of all these XML APIs 
that would simply eliminate CDATA, DOCTYPE, namespaces, etc?  Especially 
if namespaces are to be reintroduced later?

-Mike

_______________________________________________________________________

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: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



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


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.