I think it would look something like this:
Node eRoot = doc.getDocumentElement();
Nodelist nChild = eRoot.getElementByTagName("B");
Node eB = null;
if (nChild.getLength()>0)
eB = nChild.item(0);
"SETHI, BHAVDEEP SINGH (LNG)" wrote:
> Hi
> I am using Apache's xerces parser 1.3.0
> I have a xm
Hi
I am using Apache's xerces parser 1.3.0
I have a xml file that looks like this:
Tag B
Tag C
Tag B again
Tag D
I am trying to extract all the elements B (and under) out of this file and
print them; but am getting lost doing so.
The output should look like this:
Tag B
Tag C
Tag B