OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Pushing SAX events out onto the Web?

[ Lists Home | Date Index | Thread Index ]

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





 

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

Copyright 2001 XML.org. This site is hosted by OASIS