User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 426,899 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,331 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 5603 | Replies: 2
Reply
Join Date: Sep 2004
Posts: 1
Reputation: Progmet is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Progmet Progmet is offline Offline
Newbie Poster

Help Reading stream with two xml files in

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2004
Location: Hanover
Posts: 152
Reputation: cosi is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
cosi's Avatar
cosi cosi is offline Offline
Junior Poster

Re: Reading stream with two xml files in

  #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  
Join Date: Apr 2005
Location: shenzhen,guangdong,china
Posts: 1
Reputation: lixf is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
lixf lixf is offline Offline
Newbie Poster

Re: Reading stream with two xml files in

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 10:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC