private void parseFeeCheckDataNodes(XMLDocument xmlDoc, int checkDataIndex) throws XPathExpressionException { String checkDataQueryPath = replaceIndex(CHKDATA_IND_EXPR, checkDataIndex + 1); final String domainName = parseTextValue(xmlDoc, checkDataQueryPath + CHKDATA_DOMAIN_NAME_EXPR); final FeeCheckData.Command command = parseCommandNode(xmlDoc, checkDataQueryPath); FeeCheckData feeCheckData = new FeeCheckData(domainName, command); feeCheckData.setCurrency( parseTextValue(xmlDoc, checkDataQueryPath + CHKDATA_DOMAIN_CURRENCY_EXPR)); feeCheckData.setFeeClass( parseTextValue(xmlDoc, checkDataQueryPath + CHKDATA_DOMAIN_FEE_CLASS_EXPR)); feeCheckData.setPeriod(parsePeriod(xmlDoc, checkDataQueryPath)); parseFeeNodes(xmlDoc, feeCheckData, checkDataQueryPath + CHKDATA_FEE_NODES_EXPR); feeDomains.add(feeCheckData); }
private void parseFeeNodes( XMLDocument xmlDoc, FeeCheckData feeCheckData, String feeNodesQueryPath) throws XPathExpressionException { NodeList feeNodes = xmlDoc.getElements(feeNodesQueryPath); if (feeNodes != null) { for (int feeNodeIndex = 0; feeNodeIndex < feeNodes.getLength(); feeNodeIndex++) { Node feeNode = feeNodes.item(feeNodeIndex); feeCheckData.addFee(parseFee(feeNode)); } } }