Reading stream with two xml files in

Reply

Join Date: Sep 2004
Posts: 1
Reputation: Progmet is an unknown quantity at this point 
Solved Threads: 0
Progmet Progmet is offline Offline
Newbie Poster

Reading stream with two xml files in

 
0
  #1
Sep 28th, 2004
I'm trying to read a xml file which contains two xml files in one file with java from a specific directory and then writing a response file with also two xml into one file which contains variables from the read xml file. XML Parser gives me an error "The processing instruction target matching "[xX][mM][lL]" is not allowed." so now I want to use FileInputStream and FileOutputStream to do this, but is strugling with the code.
Please if anybody can help.
Thanks
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 153
Reputation: cosi is an unknown quantity at this point 
Solved Threads: 1
cosi's Avatar
cosi cosi is offline Offline
Junior Poster

Re: Reading stream with two xml files in

 
0
  #2
Oct 8th, 2004
Which XML Parser are you using? Please post a code snip.


Originally Posted by Progmet
I'm trying to read a xml file which contains two xml files in one file with java from a specific directory and then writing a response file with also two xml into one file which contains variables from the read xml file. XML Parser gives me an error "The processing instruction target matching "[xX][mM][lL]" is not allowed." so now I want to use FileInputStream and FileOutputStream to do this, but is strugling with the code.
Please if anybody can help.
Thanks
In a world without walls or fences,
What use are Windows and Gates.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1
Reputation: lixf is an unknown quantity at this point 
Solved Threads: 0
lixf lixf is offline Offline
Newbie Poster

Re: Reading stream with two xml files in

 
0
  #3
Apr 20th, 2005
Originally Posted by cosi
Which XML Parser are you using? Please post a code snip.
hi,I meeted the same problem,but I had soluted it。
the xml file is follow when a exception had throwed out like "The processing instruction target matching "[xX][mM][lL]"
<operation_in type="struct">
<service_name type="string">cc_getuserfunc</service_name>
<verify_code type="string">138563001166610798489273</verify_code>
<request_type type="int">1001</request_type>
<sysfunc_id type="int">92001004</sysfunc_id>
<operator_id type="string">9998911</operator_id>
<request_time type="datetime">20050420173432</request_time>
<request_seq type="long">13</request_seq>
<request_source type="int">101213</request_source>
<request_target type="int" />
<msg_version type="string">0100</msg_version>
<cont_version type="string">0100</cont_version>
<content><![CDATA[
<?xml version="1.0" encoding="GBK"?>
<request type="struct">
<home_city type="int" />
<msisdn type="string">13501550001</msisdn>
<password type="string" />
</request>
]]></content>
</operation_in>]

the right xml is
<operation_in type="struct">
<service_name type="string">cc_getuserfunc</service_name>
<verify_code type="string">138563001166610798489273</verify_code>
<request_type type="int">1001</request_type>
<sysfunc_id type="int">92001004</sysfunc_id>
<operator_id type="string">9998911</operator_id>
<request_time type="datetime">20050420173432</request_time>
<request_seq type="long">13</request_seq>
<request_source type="int">101213</request_source>
<request_target type="int" />
<msg_version type="string">0100</msg_version>
<cont_version type="string">0100</cont_version>
<content><![CDATA[<?xml version="1.0" encoding="GBK"?>
<request type="struct">
<home_city type="int" />
<msisdn type="string">13501550001</msisdn>
<password type="string" />
</request>]]></content>
</operation_in>]

the reason for the exception, had been throwed out is
there is new line symbol before the characters "]]></" and after the characters "<![CDATA["。
I wish my solution had show userful information for you! :p
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC