| | |
Reading stream with two xml files in
![]() |
•
•
Join Date: Sep 2004
Posts: 1
Reputation:
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
Posts: 1
Reputation:
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
![]() |
Similar Threads
- 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: IllegalStateException?
| Thread Tools | Search this Thread |
3d 6 @param actuate affinetransform android api applet application arc array arrays automation balls binary bluetooth bold business c++ class client code codesnippet collections compare component coordinates database defaultmethod detection doctype dragging ebook eclipse educational error file fractal froglogic game givemetehcodez graphics gui guitesting helpwithhomework hql html ide ideas image ingres input integer intersect invokingapacheantprogrammatically j2me java java.xls javaexcel javaprojects jni jpanel jtextarea julia keytool linux list map method methods mobile mysql netbeans nextline parameter php pong problem program project recursion recursive rim scanner sell server set sms sort sql string sun swing swt terminal threads tree web websites windows





