xml嵌套解析获取节点数据
<?xml version="1.0" encoding="UTF-8"?>我已经将第一个xml得数据解析出来了 到了<textdata>这里不会了 求大佬们指导一下附上我得代码截图<ResultData>
<VCISerialNumber>102903360148</VCISerialNumber>
<VehicleNumber>使uuuuu</VehicleNumber>
<FuelMode>汽油</FuelMode>
<TestData><![CDATA[<?xml version="1.0"?>
<response>
<cmd>GetAllData</cmd>
<code>0</code>
<msg>成功</msg>
<data>
<GetECUInfo>
<VIN>WV2D887H8KH001617</VIN>
<OBDType>EOBD</OBDType>
<OBDCode>06</OBDCode>
<ODO>不适用</ODO>
</GetECUInfo>
<GetDTCInfo>
<Current>0</Current>
<Unsettled>0</Unsettled>
<Permanent>0</Permanent>
<Mileage>0</Mileage>
</GetDTCInfo>
<GetLampState>
<LampState>0</LampState>
</GetLampState>
<GetSystemCheckState>
<DISD>T700-OBD</DISD>
<DTCNumber>0</DTCNumber>
<MFT>1</MFT>
<FST>1</FST>
<ICM>1</ICM>
<CC>1</CC>
<DOC />
<CCH>0</CCH>
<SCR />
<EECS>0</EECS>
<SAIS>0</SAIS>
<BPCS />
<OS>1</OS>
<EGS />
<OSH>1</OSH>
<DPF />
<EGR>1</EGR>
<NOX />
<POC />
<NMHC />
<MIL>0</MIL>
</GetSystemCheckState>
<GetIUPR>
<OMCEC>50</OMCEC>
<ICC>240</ICC>
<CMCCB1>32</CMCCB1>
<CMCECB1>49</CMCECB1>
<CMCCB2>0</CMCCB2>
<CMCECB2>0</CMCECB2>
<O2SMCCB1>40</O2SMCCB1>
<O2SMCECB1>50</O2SMCECB1>
<O2SMCCB2>0</O2SMCCB2>
<O2SMCECB2>0</O2SMCECB2>
<EGRC>111</EGRC>
<EGREC>50</EGREC>
<AMCCC>0</AMCCC>
<AMCEC>0</AMCEC>
<EVAPC>0</EVAPC>
<EVAPEC>0</EVAPEC>
<SOSMCCB1>70</SOSMCCB1>
<SOSMCECB1>50</SOSMCECB1>
<SOSMCCB2>0</SOSMCCB2>
<SOSMCECB2>0</SOSMCECB2>
<GPFC1>不适用</GPFC1>
<GPFEC1>不适用</GPFEC1>
<GPFC2>不适用</GPFC2>
<GPFEC2>不适用</GPFEC2>
<NMHCC />
<NMHCEC />
<NOXCC />
<NOXCEC />
<NOXAC />
<NOXAEC />
<PMC />
<PMEC />
<WSC />
<WSEC />
<PPC />
<PPEC />
</GetIUPR>
<GetOBDInfo>
<count>12</count>
<MODULEECUID>0x0E8</MODULEECUID>
<EGName>不适用</EGName>
<MODULEOtherID>不适用</MODULEOtherID>
<OtherName>不适用</OtherName>
<OtherCALID>不适用</OtherCALID>
<OtherCVN>不适用</OtherCVN>
<EGCALID />
<EGCVN>06013D5B,DA</EGCVN>
<SCRName>SCR</SCRName>
<MODULESCRID>不适用</MODULESCRID>
<SCRCVN>不适用</SCRCVN>
<SCRCALID>不适用</SCRCALID>
</GetOBDInfo>
</data>
</response>
]]></TestData>
<FormatData><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<OBDReport>
<GetECUInfo>
<VIN>WV2D887H8KH001617</VIN>
<EMSCALID> </EMSCALID>
<EMSCVN>06013D5B,DA</EMSCVN>
<DCUCALID></DCUCALID>
<DCUCVN></DCUCVN>
<OtherCALID></OtherCALID>
<OtherCVN></OtherCVN>
</GetECUInfo>
<OBDCheckInfo>
<OBDStatus>
<OBDMIL>1</OBDMIL>
<OBDComm>0</OBDComm>
<OBDMILON>1</OBDMILON>
<FaultInfo>故障信息保存上报</FaultInfo>
</OBDStatus>
<IMReadiness>
<IMReadinessCC>0</IMReadinessCC>
<IMReadinessOS>0</IMReadinessOS>
<IMReadinessOSH>0</IMReadinessOSH>
<IMReadinessEGR>0</IMReadinessEGR>
<IMReadinessSCR>0</IMReadinessSCR>
<IMReadinessPOC>0</IMReadinessPOC>
<IMReadinessDOC>0</IMReadinessDOC>
<IMReadinessDPF>0</IMReadinessDPF>
<IMReadinessEGR>0</IMReadinessEGR>
</IMReadiness>
<OtherInfo>
<MILDistance>0km</MILDistance>
</OtherInfo>
<Result>
<check>1<eck>
<Recheck>1</Recheck>
<RecheckInfo></RecheckInfo>
<RecheckRet>2</RecheckRet>
</Result>
</OBDCheckInfo>
</OBDReport>
]]></FormatData>
<DiagnoseTime>2021-11-22 10:29:47</DiagnoseTime>
</ResultData>
<?xml version="1.0" encoding="UTF-8"?>
<ResultData>
<VCISerialNumber>102903360148</VCISerialNumber>
<VehicleNumber>使uuuuu</VehicleNumber>
<FuelMode>汽油</FuelMode>
<TestData><![CDATA[<?xml version="1.0"?>
xzcnmb 发表于 2021-11-22 16:01
这是开头得节点 不限制语言的话可以尝试Python的 xmltodict 请教下大佬,这个是做什么用的 xzcnmb 发表于 2021-11-22 16:01
语言是c# 求助各位大佬
页:
[1]