Michael Atighetchi a �crit:
I think regular expression are faster than a xml parser.Hi Cyrille,yes, my question was relating to a subscriber client (on the client side). After reading up on XML, it seems like there are multiple possibilities to extract information from XML strings: - java regular expressions with parenthesis capturing (for the perl hackers :) - JAX DOM parser - dom4j or JDOM (which claim to have a more JAVA like fealing to them). For the case below, sticking with java regular expressions seems fine, so that is what I also used in my example.
I prefer to use regex for messages elements. They are well know and does not use complex xml grammar.
And only if I've a really unknow xml content, I instanciate a xml parser.
Have fun with the really great xmlBlaster !
cyrille
On Mon, Feb 17, 2003 at 10:05:29AM +0100, Cyrille Giquello wrote:
Michael Atighetchi a �crit:
The documentation in XmlKey gives this as a typical publish example:Hello Michael,
<key oid='4711' contentMime='text/xml'>
<AGENT id='192.168.124.20' subId='1' type='generic'>
<DRIVER id='FileProof' pollingFreq='10'>
</DRIVER>
</AGENT>
</key>
What is the common way for an application to parse this XML chunck in
the subscribing client to get out id, subId and type in <AGENT> ?
if I well understand, your question is about client side ? isn't it ?
At client side, you have to deal with xml like in other application that using xml.
xmlBlaster client give you a raw block of text, that contains xml.
So, with a xml parser you can querying that xml block.
Sorry, I've no java code under my hand.
Perhaps in demo codes you can find some exemple, or in a xml tutorial.
Did I well understand you question ?
cyrille
ps : I'm away from that list for a long time. sorry, I'm under massive projects.
shure I'll come back & contribute ;o)
