xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: lneves <lneves AT netcabo.pt>
- To: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] reading an xml from a socket
- Date: Tue, 24 Oct 2006 09:36:11 +0100
Thanks for the detailed response, much appreciated.
--
Luis Neves
Wolfgang Hoschek wrote:
On Oct 22, 2006, at 3:50 PM, lneves wrote:
Wolfgang Hoschek wrote:
But to put the discussion into perspective: Any reasonable higherUnfortunately there are some protocols that are not reasonable. XMPP [1] is one them.
level protocol defines a generic framing mechanism, thereby omitting
the need to think about XML specific framing anyway.
It's basically a stream of XML fragments dumped into a socket and it's up to the
angle brackets to do the framing. What is your suggestion to deal with something like
XMPP?
XMPP basically says a (TCP) connection is used to transport a single XMPP stream, which is an open-ended XML document: the document has a root element that can have arbitrarily many child elements. During the life of the stream, the entity that initiated it can send an unbounded number of XML elements over the stream. Errors (e.g. not wellformed XML) are unrecoverable, implying closing the connection. Presumably errors are unrecoverable because XMPP is lacking a sensible framing mechanism, as you point out.
If the question is how to read and write an XMPP stream with XOM:
- for writing: use a StreamingSerializer [1].
- for reading: use the XOM NodeFactory of a StreamingPathFilter [2] with a "/*/*" path and any XOM Builder. A user defined handler will be called for each XMPP stanza and given the corresponding XOM fragment.
[1] http://dsd.lbl.gov/nux/api/nux/xom/io/StreamingSerializer.html
[2] http://dsd.lbl.gov/nux/api/nux/xom/xquery/StreamingPathFilter.html
Wolfgang.
-
Re: [XOM-interest] reading an xml from a socket
, (continued)
-
Re: [XOM-interest] reading an xml from a socket,
Wolfgang Hoschek, 10/20/2006
-
Re: [XOM-interest] reading an xml from a socket,
Steve Loughran, 10/20/2006
-
Re: [XOM-interest] reading an xml from a socket,
Wolfgang Hoschek, 10/20/2006
-
Re: [XOM-interest] reading an xml from a socket,
Steve Loughran, 10/21/2006
- Re: [XOM-interest] reading an xml from a socket, Wolfgang Hoschek, 10/21/2006
-
Re: [XOM-interest] reading an xml from a socket,
John Cowan, 10/21/2006
-
Re: [XOM-interest] reading an xml from a socket,
Wolfgang Hoschek, 10/22/2006
- Re: [XOM-interest] reading an xml from a socket, lneves, 10/22/2006
- Re: [XOM-interest] reading an xml from a socket, Wolfgang Hoschek, 10/23/2006
- Re: [XOM-interest] reading an xml from a socket, Steve Loughran, 10/23/2006
- Re: [XOM-interest] reading an xml from a socket, lneves, 10/24/2006
-
Re: [XOM-interest] reading an xml from a socket,
Wolfgang Hoschek, 10/22/2006
- Re: [XOM-interest] reading an xml from a socket, John Cowan, 10/25/2006
-
Re: [XOM-interest] reading an xml from a socket,
Steve Loughran, 10/21/2006
-
Re: [XOM-interest] reading an xml from a socket,
Wolfgang Hoschek, 10/20/2006
-
Re: [XOM-interest] reading an xml from a socket,
Steve Loughran, 10/20/2006
-
Re: [XOM-interest] reading an xml from a socket,
Wolfgang Hoschek, 10/20/2006
Archive powered by MHonArc 2.6.24.