commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Semmens <lance.semm...@essential.com.au>
Subject [digester] Unhandled element and attributes
Date Fri, 14 Jan 2005 05:03:45 GMT
Do any rules exist that will execute if an unexpected element or attribute
is encountered in an XML file.

For the following xml
	<tag-a/>
	<tag-b/>
	<tag-c/>

And the following code
	Digester dig = new Digester();
	dig.addObjectCreate("*/tag-a", ATag.class);
	dig.addCallMethod("*/tag-b", "doBTag");
	dig.parse(...);

I'd like a way of handling all the patterns that I have not attached rules
to.
In my example, I have not attached a rule to <tag-c/> so I'd like to produce
a warning in this case.

Any suggestions?

Thanks,
Lance.




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message