Note that there are some explanatory texts on larger screens.

plurals
  1. POFatal Error The processing instruction target matching "[xX][mM][lL]" is not allowed
    primarykey
    data
    text
    <p>I am getting the following exception while parsing my xml using dom parser. The url "http://www.xyz.com/ABC.aspx?accessCode=......&amp;vin=GJHHFJHFJHFGF6788&amp;reportType=3" returns a xml for every vin parameter.</p> <p>Here is the xml returned by above url</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt; &lt;VINdecode Version="1.0.0" Report_Type="LITE" Date="11/1/2012"&gt; &lt;VIN Number="GJHHFJHFJHFGF6788" Status="SUCCESS"&gt; &lt;Vehicle VINdecode_Vehicle_ID="26870" Model_Year="2004" Make="Volkswagen" Model="Touareg" Trim_Level="V6"&gt; &lt;Item Key="Model Year" Value="2004" Unit="" /&gt; &lt;Item Key="Make" Value="Volkswagen" Unit="" /&gt; &lt;Item Key="Model" Value="Touareg" Unit="" /&gt; &lt;Item Key="Trim Level" Value="V6" Unit="" /&gt; &lt;Item Key="Manufactured in" Value="GERMANY" Unit="" /&gt; &lt;Item Key="Body Style" Value="SPORT UTILITY 2-DR" Unit="" /&gt; &lt;Item Key="Engine Type" Value="3.2L V6 DOHC 24V" Unit="" /&gt; &lt;/Vehicle&gt; &lt;/VIN&gt; &lt;/VINdecode&gt; </code></pre> <p>Here is the code which i use to parse xml returned from the url with vin.</p> <pre><code> public VIN getVINExpansion(String vin) { if(vin.length() != 17) return null; VIN vehicle = null; try { String url="http://www.xyz.com/ABC.aspx?accessCode=........&amp;vin=" + vin + "&amp;reportType=3"; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(url); **// I get Exception in this line** NodeList vinlist = doc.getElementsByTagName("VIN"); // rest goes here } catch(Exception e) { e.printStackTrace(); } return vin; } </code></pre> <p>When I pass a "vin" parameter to above function from my client side through rpc call, I get correct response. But after few hours (say 4-5) hours when I pass the same vin parameter,I get exception. After that I keep on getting this exception till i restart my tomcat server. After restarting tomcat server, again i get correct response for 4-5 hours till it starts failing. </p> <p>Exception I get :</p> <pre><code>[Fatal Error] xml_ABC.aspx?accessCode=.......&amp;vin=GJHHFJHFJHFGF6788&amp;reportType=3:4:6: The processing instruction target matching "[xX][mM][lL]" is not allowed. org.xml.sax.SAXParseException; systemId: http://www.xyz.com/ABC.aspx?accessCode=......&amp;vin=GJHHFJHFJHFGF6788&amp;reportType=3; lineNumber: 4; columnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not allowed. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:177) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload