[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-user
Subject:    xmlbeans chokes on invalid xml
From:       "Ole Lensmar" <ole () eviware ! com>
Date:       2009-07-01 9:11:50
Message-ID: 006101c9fa2b$f8d75890$ea8609b0$ () com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi!

I have the following (invalid) xml:

 

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Fault
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Code
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Value
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">soapenv:Receiver</so
apenv:Value></soapenv:Code><soapenv:Reason
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Text
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xmlns="http://www.w3.org/XML/1998/namespace" xml:lang="en-US">For input
string: "1XXXXBAD"</soapenv:Text></soapenv:Reason><soapenv:Detail
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"></soapenv:Detail></s
oapenv:Fault></soapenv:Body></soapenv:Envelope>

 

(there is an invalid xmlns="http://www.w3.org/XML/1998/namespace" in there).

 

When trying to parse this xmlbeans does ok, but when doing xmlText() on the
created XmlObject it goes into an endless loop somehow.. 

 

A JUnit TestCase that hangs is as follows:

 

package com.eviware.soapui.support.xml;

 

import junit.framework.TestCase;

 

import org.apache.xmlbeans.XmlObject;

 

public class XmlBeansTestCase extends TestCase

{

       public void testXml() throws Exception

       {

              String xml = "<?xml version='1.0'
encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">" +

                           "<soapenv:Body
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">" +

                           "<soapenv:Fault
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">" +

                           "<soapenv:Code
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">" +

                           "<soapenv:Value
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">soapenv:Receiver</
soapenv:Value>" +

                           "</soapenv:Code><soapenv:Reason
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\">" +

                           "<soapenv:Text
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\"
xmlns=\"http://www.w3.org/XML/1998/namespace\" " +

                           "xml:lang=\"en-US\">For input string:
\"1XXXXBAD\"</soapenv:Text></soapenv:Reason>" +

                           "<soapenv:Detail
xmlns:soapenv=\"http://www.w3.org/2003/05/soap-envelope\"></soapenv:Detail>"
+

 
"</soapenv:Fault></soapenv:Body></soapenv:Envelope>";

              

              XmlObject xmlObject = XmlObject.Factory.parse( xml );

              xmlObject.xmlText();

       }

}

 

(confirmed in 2.4.0 and HEAD)

 

Although the XML is invalid, it would be nice if there was either an
exception thrown or something else that doesn't choke the program.. 

 

Or am I misunderstanding something!?

 

Thanks for any help!

 

Regards,

 

/Ole

Eviware.com

 


eviware 

 Ole Lensmar
 ole@eviware.com <mailto:niclas@eviware.com> 
 tel: +46 (0)703 555 000
 fax: +46 (0)8 790 61 19

		
		

 

 


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:x="urn:schemas-microsoft-com:office:excel" \
xmlns:p="urn:schemas-microsoft-com:office:powerpoint" \
xmlns:a="urn:schemas-microsoft-com:office:access" \
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" \
xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" \
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" \
xmlns:b="urn:schemas-microsoft-com:office:publisher" \
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" \
xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" \
xmlns:odc="urn:schemas-microsoft-com:office:odc" \
xmlns:oa="urn:schemas-microsoft-com:office:activation" \
xmlns:html="http://www.w3.org/TR/REC-html40" \
xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" \
xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" \
xmlns:Repl="http://schemas.microsoft.com/repl/" \
xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" \
xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" \
xmlns:ppda="http://www.passport.com/NameSpace.xsd" \
xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" \
xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" \
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" \
xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" \
xmlns:udc="http://schemas.microsoft.com/data/udc" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema" \
xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" \
xmlns:ec="http://www.w3.org/2001/04/xmlenc#" \
xmlns:sp="http://schemas.microsoft.com/sharepoint/" \
xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" \
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" \
xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" \
xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" \
xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" \
xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" \
xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" \
xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" \
xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" \
xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" \
xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" \
xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" \
xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" \
xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" \
xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"\@SimSun";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
span.EmailStyle19
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="3074" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal style='margin-bottom:12.0pt'>Hi!<o:p></o:p></p>

<p class=MsoNormal>I have the following (invalid) xml:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>&lt;?xml version='1.0'
encoding='UTF-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv=&quot;<a
href="http://www.w3.org/2003/05/soap-envelope" \
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot;&gt;&lt;soapenv:Body \
xmlns:soapenv=&quot;<a href="http://www.w3.org/2003/05/soap-envelope" \
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot;&gt;&lt;soapenv:Fault
 xmlns:soapenv=&quot;<a href="http://www.w3.org/2003/05/soap-envelope"
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot;&gt;&lt;soapenv:Code
xmlns:soapenv=&quot;<a href="http://www.w3.org/2003/05/soap-envelope"
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot;&gt;&lt;soapenv:Value
 xmlns:soapenv=&quot;<a href="http://www.w3.org/2003/05/soap-envelope"
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot;&gt;soapenv:Receiver&lt;/soapenv:Value&gt;&lt;/soapenv:Code&gt;&lt;soapenv:Reason
 xmlns:soapenv=&quot;<a href="http://www.w3.org/2003/05/soap-envelope"
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot;&gt;&lt;soapenv:Text
xmlns:soapenv=&quot;<a href="http://www.w3.org/2003/05/soap-envelope"
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot; xmlns=&quot;<a
href="http://www.w3.org/XML/1998/namespace" \
target="_blank">http://www.w3.org/XML/1998/namespace</a>&quot; \
xml:lang=&quot;en-US&quot;&gt;For input string: \
&quot;1XXXXBAD&quot;&lt;/soapenv:Text&gt;&lt;/soapenv:Reason&gt;&lt;soapenv:Detail \
xmlns:soapenv=&quot;<a href="http://www.w3.org/2003/05/soap-envelope" \
target="_blank">http://www.w3.org/2003/05/soap-envelope</a>&quot;&gt;&lt;/soapenv:Deta \
il&gt;&lt;/soapenv:Fault&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;<o:p></o:p></p>


<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>(there is an invalid xmlns=&quot;<a
href="http://www.w3.org/XML/1998/namespace" \
target="_blank">http://www.w3.org/XML/1998/namespace</a>&quot; in \
there).<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>When trying to parse this xmlbeans does ok, but when doing
xmlText() on the created XmlObject it goes into an endless loop somehow.. \
<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>A JUnit TestCase that hangs is as follows:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New";color:#7F0055'>package</span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:black'>
com.eviware.soapui.support.xml;</span><span style='font-size:8.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New";color:#7F0055'>import</span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:black'>
junit.framework.TestCase;</span><span style='font-size:8.0pt;font-family:"Courier \
New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New";color:#7F0055'>import</span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:black'>
org.apache.xmlbeans.XmlObject;</span><span style='font-size:8.0pt;font-family:
"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><b><span style='font-size:8.0pt;
font-family:"Courier New";color:#7F0055'>public</span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:black'> </span><b><span
style='font-size:8.0pt;font-family:"Courier New";color:#7F0055'>class</span></b><span
style='font-size:8.0pt;font-family:"Courier New";color:black'> XmlBeansTestCase
</span><b><span style='font-size:8.0pt;font-family:"Courier \
New";color:#7F0055'>extends</span></b><span \
style='font-size:8.0pt;font-family:"Courier New";color:black'> TestCase</span><span \
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New";color:black'>{</span><span style='font-size:8.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span><b><span style='font-size:8.0pt;font-family:"Courier \
New";color:#7F0055'>public</span></b><span \
style='font-size:8.0pt;font-family:"Courier New";color:black'> </span><b><span \
style='font-size:8.0pt;font-family:"Courier New";color:#7F0055'>void</span></b><span \
style='font-size:8.0pt;font-family:"Courier New";color:black'> testXml() \
</span><b><span style='font-size:8.0pt;font-family:"Courier \
New";color:#7F0055'>throws</span></b><span \
style='font-size:8.0pt;font-family:"Courier New";color:black'> Exception</span><span \
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
{</span><span style='font-size:8.0pt;font-family:"Courier \
New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 String xml = </span><span style='font-size:8.0pt;font-family:"Courier New";
color:#2A00FF'>&quot;&lt;?xml version='1.0'
encoding='UTF-8'?&gt;&lt;soapenv:Envelope
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot;&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;soapenv:Body \
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot;&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;soapenv:Fault \
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot;&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;soapenv:Code \
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot;&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;soapenv:Value \
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot;&gt;soapenv:Receiver&lt;/soapenv:Value&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;/soapenv:Code&gt;&lt;soapenv:Reason \
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot;&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;soapenv:Text \
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot; \
xmlns=\&quot;http://www.w3.org/XML/1998/namespace\&quot; &quot;</span><span \
style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span \
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;xml:lang=\&quot;en-US\&quot;&gt;For input string: \
\&quot;1XXXXBAD\&quot;&lt;/soapenv:Text&gt;&lt;/soapenv:Reason&gt;&quot;</span><span \
style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span \
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;soapenv:Detail \
xmlns:soapenv=\&quot;http://www.w3.org/2003/05/soap-envelope\&quot;&gt;&lt;/soapenv:Detail&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'> +</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New";color:#2A00FF'>&quot;&lt;/soapenv:Fault&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;&quot;</span><span
 style='font-size:8.0pt;font-family:"Courier New";color:black'>;</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 </span><span style='font-size:8.0pt;font-family:"Courier \
New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 XmlObject xmlObject = XmlObject.Factory.<i>parse</i>( xml );</span><span
style='font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier \
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 xmlObject.xmlText();</span><span style='font-size:8.0pt;font-family:"Courier \
New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}</span><span style='font-size:8.0pt;font-family:"Courier \
New"'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:8.0pt;
font-family:"Courier New";color:black'>}</span><span style='font-size:8.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>(confirmed in 2.4.0 and HEAD)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Although the XML is invalid, it would be nice if there was
either an exception thrown or something else that doesn&#8217;t choke the
program.. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Or am I misunderstanding something!?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks for any help!<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Regards,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>/Ole<o:p></o:p></p>

<p class=MsoNormal>Eviware.com<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<table class=MsoNormalTable border=0 cellpadding=0>
 <tr>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New \
Roman","serif"'><img  border=0 width=177 height=67 id="Picture_x0020_1"
  src="cid:image001.gif@01C9FA2D.516BEE70" alt=eviware></span><span
  style='font-size:12.0pt;font-family:"Times New \
Roman","serif"'>&nbsp;<o:p></o:p></span></p>  </td>
  <td width=171 style='width:128.35pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal \
style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span  \
style='font-size:9.0pt;font-family:"Arial","sans-serif"'>&nbsp;Ole Lensmar<br>  \
</span></b><i><span style='font-size:9.0pt;font-family:"Arial","sans-serif"'>&nbsp;<a \
href="mailto:niclas@eviware.com">ole@eviware.com</a><br>  </span></i><span \
style='font-size:9.0pt;font-family:"Arial","sans-serif"'>&nbsp;tel:  +46 (0)703 555 \
000<br>  &nbsp;fax: +46 (0)8 790 61 19<o:p></o:p></span></p>
  </td>
 </tr>
 <tr>
  <td style='padding:.75pt .75pt .75pt .75pt'></td>
  <td width=171 style='width:128.35pt;padding:.75pt .75pt .75pt .75pt'></td>
 </tr>
 <tr>
  <td style='padding:.75pt .75pt .75pt .75pt'></td>
  <td width=171 style='width:128.35pt;padding:.75pt .75pt .75pt .75pt'></td>
 </tr>
</table>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>


["image001.gif" (image/gif)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic