I would like to build a map of processing instruction targets and data using
Digester. I can do this by extending Digester
class PIDigester extends Digester {
...constructors...
public void processingInstruction (
String target,
String data
) {
super.processingInstruction ( target, data ) ;
myMap.put ( target, data ) ;
}
}
I'd prefer to collect this information by adding a Rule to a Digester
instance, something similar to this:
HashMap m = new HashMap () ; // or MultiHashMap
digester.addRule ( "processing-instruction()", new PIRule ( m ) ) ;
Then this document
<?xml version="1.0"?>
<?origin pg?>
<?origin-alt fd?>
<root/>
would result in this map:
origin: pg
origin-alt: fd
Does anyone know if this is already possible or if something similar can be
done without extending Digester?
Many Thanks,
Janek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]