Commit 4345a832 by gechengyang

提交解析ISO报文的测试代码

parent 3fd23a0f
......@@ -17,11 +17,19 @@ public class ParseISOTest {
Document document = DocumentHelper.parseText(xmlStr);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
System.out.println("isoMaps="+parentElementMaps);
String bodyParentElementName = parentElementMaps.get("CdtTrfTxInf");
String endToEndId = XmlUtil.getXmlNodeValue(document, bodyParentElementName + ".CdtTrfTxInf.PmtId.EndToEndId");
String bodyParentElementName = parentElementMaps.get("EndToEndId");
String endToEndId = XmlUtil.getXmlNodeValue(document, bodyParentElementName + ".EndToEndId");
System.out.println("endToEndId="+endToEndId);
String ownrefParentElentName=parentElementMaps.get("InstrId");
String ownref=XmlUtil.getXmlNodeValue(document,ownrefParentElentName+".InstrId");
System.out.println("ownref="+ownref);
String valueDateParentElementName=parentElementMaps.get("IntrBkSttlmDt");
String valueDate=XmlUtil.getXmlNodeValue(document,valueDateParentElementName+".IntrBkSttlmDt");
System.out.println("valueDate="+valueDate);
//ownref我行参考号
//othref他行参考号
//参数 xmlPath报文路径 收发报标识flg 返回Map对象
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment