我有2个不同的xmls,我需要为这些xmls创建一个2个不同的字典然后需要进行比较。 两个xmls都有不同的标签,父/子节点也不同。请建议。
XML1:
<REMEMBER xmlns:ns0="http://testsite.com/man/schma/vfg"> <ICDVersion>11.0</ICDVersion>
<T_MSGH>
<Source xmlns:ns4="http://testsite.com/man/schma/vfg/core">PDD</Source>
<NAME xmlns:ns5="http://testsite.com/man/schma/vfg/core">ALPHA</NAME>
</T_MSGH>
<T_PAR>YAMAHA</T_PAR>
<T_CUS>FRENVH1234</T_CUS>
<T_ORP>
<FirstName xmlns:ns6="http://testsite.com/man/schma/vfg/core">MEENA</FirstName>
<LastName xmlns:ns7="http://testsite.com/man/schma/vfg/core">SINGH</LastName>
</T_ORP>
<T_RAMBO>
<Street1 xmlns:ns9="http://testsite.com/man/schma/vfg/core">2123 REMAN</Street1>
<City xmlns:ns10="http://testsite.com/man/schma/vfg/core">FRANC</City>
</T_RAMBO>
<T_EMAIL>NANCY@NANCY.COM</T_EMAIL>
</REMEMBER>
XML2:
<?xml version="1.0"?><ALPHA_Output xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://DECEEMBER.ABC.COM/xml/INFO_OUTPUT.xsd">
<PO>
<PO_ID>3557698</PO_ID>
<MAN>HQF011512C</MAN>
<SUCCESS>SUCCESS</SUCCESS>
<DSO_INFO>
<A key='POC2_FULL_NAME'> </A>
<A key='REC_STAT'>Locked</A>
VADB (XXX-XXX-XXXX): 000-000-0000
CHANNEL MULTICAST ADDRESS: 224.0.1.8
LAN2 SUBNET MASK: 255.255.255.192
8 PORT HUB: No
</A>
<A key='GO_NOTE'>This is a Quality)</A>
<A key='RAMA'>2573</A>
</DSO_INFO>
<LAMBDA_INFO>
<PARAM>
<A key='PARAMDESC'>IP ADDRESS</A>
<A key='PARAMVAL'>10.6.6.6</A>
</PARAM>
<PARAM>
<A key='PARAMDESC'>POP (XXX-XXX-XXXX)</A>
<A key='PARAMVAL'>000-000-0000</A>
</PARAM>
<PARAM>
<A key='PARAMDESC'>ADDRESS</A>
<A key='PARAMVAL'>3.4.5.6</A>
</PARAM>
</LAMBDA_INFO>
<MOA_INFO>
<MOA>
<A key='MOA_ID'>11111</A>
<A key='ENT_DT'>01/15/2012 02:33:22</A>
</MOA>
<MOA>
<A key='MOA_ID'>11111</A>
<A key='ENT_DT'>01/15/2012 02:33:22</A>
<A key='ENT_BY'>Creation</A>
</MOA>
</MOA_INFO>
<DETACH_INFO>
</DETACH_INFO>
</PO>
</ALPHA_Output>