•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 373,375 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 3,732 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: 5167 | Replies: 2
![]() |
•
•
Join Date: Sep 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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
Please if anybody can help.
Thanks
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.
•
•
Join Date: Apr 2005
Location: shenzhen,guangdong,china
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Originally Posted by cosi
Which XML Parser are you using? Please post a code snip.
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
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
•
•
•
•
aol api asp audio blogger blogging code com development dom feed files fix flash flv free gdata google hidden files how html java legal linspire linux microsoft microsoft sdk for java microsystems mp3 music news open openoffice platform programming reader rss software solve source ssvichosst standards stream sun video virus w3c web xml xoap
- Java code to compare XML files (Java)
- How to compare folders of XML files in Perl using ExamXML (Perl)
- Eliminating Whitespace characters while parsing XML Files using DOM (Java)
- compare 2 xml files with csharp (C#)
- working with xml files without physically storing them. (ASP.NET)
Other Threads in the Java Forum
- Previous Thread: Can't think of anything to write...
- Next Thread: java application that will print to patterns


Linear Mode