Java tutorial
//package com.java2s; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static String getPkey(final Node markitBondNode) { final NodeList markitBondNodeChildrenList = markitBondNode.getChildNodes(); final int length = markitBondNodeChildrenList.getLength(); for (int j = 0; j < length; ++j) { final Node childNode = markitBondNodeChildrenList.item(j); final String childName = childNode.getNodeName(); if ("pkey".equals(childName)) { final String issuerIdString = childNode.getTextContent(); return issuerIdString; } } return null; } }