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

Re: Pushing SAX events out onto the Web?


sax events
Ah, you want to know my use case?  I've been deliberately vague on this
as it is a bit sensitive but I'll give the essense.

Scenario:

I have a sensor that is collecting information over time.  As the data
is collected I want to stream it out to clients.  The data within each
element is huge.  Consequently, the number of SAX events would be small
compared with the size of the data.

I understand your point that sending a bunch of tiny event messages is a
bad idea.  I agree.  Streaming an XML string is preferred.  I think that
I can use SAX to stream XML strings (I believe that this is what Francis
was saying).  For example, for the SAX startElement method:

public void startElement (String ns, String local, 
                          String qName, Attributes atts) {
   -- startTag = XML string representing the start element
   -- along with attributes, and namespace, e.g.,
   -- <boeing:aircraft type="747">

   socket.send(startTag);
}

Is this what ya'll are saying?  /Roger


Didier PH Martin wrote:
> 
> Hi Roger,
> 
> Roger said:
>         What's the difference between streaming SAX events versus
> "streaming the
>         XML"?  /Roger
> 
> 
> Didier replies:
> In order to better understand why you want to do that, can I ask you
> some questions?
> 
> a) Is the original XML document not a document? I mean that the XML is
> virtual and that the end point produces events based on a particular
> query. Is it that? Or..
> b) The original XML document is huge (perhaps several hundred Kbytes).
> 
> So case 1 means that you interact with a hierarchical DB presenting an
> XML like structure (i.e. an infoset) and XML framework interfaces like,
> for instance, XQuery, Xpath, etc... The result set is a stream of
> events. In case 2, a huge text document is stored and you prefer to send
> events than a subset of this document.
> 
> Is it case 1 or 2? Or something else?
> 
> Cheers
> Didier PH Martin


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.