Do you mean that -given one of "permanent" or "contract"- you want the parser to ignore all employees of the other type?
If so, you could set a boolean "ignore" to false/true in the startElement method of the DocumentHandler, depending on the value of the "type" attribute. All other code in the DocumentHandler can then skip processing if "ignore" is set to true.
Alternatively, you could write an XPath expression that returns only employees of a suitable type. Then you'd be working with DOM, not SAX, though.
Joined: May 26, 2008
thanks Ulf Dittmer for the reply,
yes your correct either if i pass permanent or contract i should get that particular employee details