xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sureka, Sushil" <sushil.sur...@tgslc.org>
Subject Content handler based on the XML content??
Date Fri, 30 Mar 2001 20:48:16 GMT
Hi,

Is it possible to load a particular content handler  based on one of the
field value in the xml file. For example if I have

One record as
<Record1>
 	< BorrName> .... </BorrName>
	.............................
</Record1>


and another record as
<Record2>
	<Response> REJECTED</Respone>
	................
</Record2>

And any of this record can appear in the file 

when I am loading the file I don't know what kind of record it contain, but
based on whether it is AppSend or AppResponse I want to register seperate
content handler for parsing.

The only way I can think of is possible is register a generic handler to
start with and this handler sets some global variable based on if it is
Record1 or Record2.
And then, reparse the file (using the new content handler) based on
this variable. But this is not desirable solution since it parses the file
twice.
The only other way would be to have one handler handle all different kind of
records

Sushil


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message