XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Never mind the browser, let's do MicroXML

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: [xml-dev] 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]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS