当我尝试在java中解析xml文件时,我得到无效的参数异常。我正在使用dom解析器来解析....

时间:2011-04-05 09:20:56

标签: java xml

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Header/> <SOAP-ENV:Body>  <m:Inform xmlns:m="urn:dslforum-org:cwmp-1-0">  <m:DeviceId xsi:type="soap-enc:type"><m:Manufacturer xsi:type="xsd:string">arg</m:Manufacturer><m:OUI xsi:type="xsd:string">arg</m:OUI><m:ProductClass xsi:type="xsd:string">arg</m:ProductClass><m:SerialNumber xsi:type="xsd:string">TR106</m:SerialNumber></m:DeviceId><m:Event xsi:type="soap-enc:arrayType"><m:EventStruct><m:EventCode xsi:type="xsd:string">6 CONNECTION_REQUEST</m:EventCode></m:EventStruct></m:Event><m:MaxEnvelopes xsi:type="xsd:unsignedInt">1</m:MaxEnvelopes><m:CurrentTime xsi:type="xsd:dateTime">2011.02.29 AD at 05:03:25 PM IST </m:CurrentTime><m:RetryCount xsi:type="xsd:unsignedInt">0</m:RetryCount><m:ParameterList xsi:type="cwmp:ParameterValueStruct[5]"><m:ParameterValueStruct><m:name xsi:type="xsd:string">Device.DeviceInfo.HardwareVersion</m:name><m:value xsi:type="xsd:string">arg</m:value></m:ParameterValueStruct><m:ParameterValueStruct><m:name xsi:type="xsd:string">Device.DeviceInfo.SoftwareVersion</m:name><m:value xsi:type="xsd:string">arg</m:value></m:ParameterValueStruct><m:ParameterValueStruct><m:name xsi:type="xsd:string">Device.ManagementServer.ConnectionRequestURL</m:name><m:value xsi:type="xsd:string">arg</m:value></m:ParameterValueStruct><m:ParameterValueStruct><m:name xsi:type="xsd:string">Device.ManagementServer.ParameterKey</m:name><m:value xsi:type="xsd:string">ABC1000</m:value></m:ParameterValueStruct><m:ParameterValueStruct><m:name xsi:type="xsd:string">Device.LAN.IPAddress</m:name><m:value xsi:type="xsd:string">arg</m:value></m:ParameterValueStruct></m:ParameterList></m:Inform> </SOAP-ENV:Body></SOAP-ENV:Envelope>

1 个答案:

答案 0 :(得分:0)

有关该错误的更多信息会很好,所以我只是猜测:您的xsd:dateTime 2011.02.29 AD at 05:03:25 PM IST看起来很可疑,请参阅http://books.xmlschemata.org/relaxng/ch19-77049.html了解有效示例。