Re: to retrieve the processing instruction

"R. Mark Volkmann" wrote:
> Here are two Java methods you can add to your code that will do it.
> 
> [...]
>             if (node instanceof ProcessingInstruction &&

node instanceof ProcessingInstruction is dangerous here and make expectation
on the underlying DOM implementation. Nothing prevents a DOM implementation
to implement several DOM interfaces in the same class.
Instead, I would suggest using
 if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE &&

Philippe

Received on Wednesday, 20 December 2000 11:58:29 UTC