[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] XML newby question

Michael Atighetchi a écrit:

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

For the case below, sticking with java regular expressions seems fine,
so that is what I also used in my example.

I think regular expression are faster than a xml parser.

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 !


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:

 <key oid='4711' contentMime='text/xml'>
     <AGENT id='' subId='1' type='generic'>
        <DRIVER id='FileProof' pollingFreq='10'>

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> ?

Hello Michael,

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 ?


ps : I'm away from that list for a long time. sorry, I'm under massive projects.
shure I'll come back & contribute ;o)