View previous topic :: View next topic
|
Author |
Message |
Thamilselvi
New User
Joined: 22 Jun 2012 Posts: 57 Location: Chennai
|
|
|
|
Hi,
I am working on XMLParse in CICS COBOL program. When I try to parse the below XML, I am getting Exception error after the XML declaration statement. My program parses till Standalone Declaration. While parsing the comment statement, I am getting Exception error code "2".
When i ran the same XML in batch (COBOL), its working fine. Please help me to solve this.
XML Scritp:
<?xml version="1.0" encoding="IBM-1140" standalone="yes"?> <!--this document is just an example--><customer-Details> <customer-name>Company Name.</customer-name> <employee-Details> <employee> <emp-name>AAAAAA</emp-name> <emp-pan-no>A111111111</emp-pan-no> <emp-location>KARNATAKA</emp-location> <emp-designation>S/W ENGING</emp-designation> <emp-salary>100000</emp-salary> <emp-on-bench>NO</emp-on-bench> <project-name>Mainframe</project-name> </employee> <employee-Details><customer-Details> |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
As it is rather late here and i suspect rather early there, i'll give this a shot.
I've not done much xml, but is the posted xml correct? There are no terminators for <employee-Details><customer-Details> that i can see . . . |
|
Back to top |
|
|
Thamilselvi
New User
Joined: 22 Jun 2012 Posts: 57 Location: Chennai
|
|
|
|
Sorry, I have missed the terminator while editing this XML script. Please find the correct one below.
<?xml version="1.0" encoding="IBM-1140" standalone="yes"?> <!--this document is just an example--><customer-Details> <customer-name>Company Name.</customer-name> <employee-Details> <employee> <emp-name>AAAAAA</emp-name> <emp-pan-no>A111111111</emp-pan-no> <emp-location>KARNATAKA</emp-location> <emp-designation>S/W ENGING</emp-designation> <emp-salary>100000</emp-salary> <emp-on-bench>NO</emp-on-bench> <project-name>Mainframe</project-name> </employee> </employee-Details></customer-Details> |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Since byte 80 occurs in the middle of the comment statement, I suspect what you show as the XML is not exactly how it is being presented to the CICS program.
Where is this XML coming from?
If it is coming from a file, what is the record length of the file?
If it is coming from a terminal, how do you combine the various lines to create a single variable to use the XML PARSE verb on?
If it is coming from somewhere else, how long are the records being passed to your CICS program? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Exception 2 :
The parser found an invalid start of a processing instruction, element, comment, or document type declaration outside element content. |
|
Back to top |
|
|
Thamilselvi
New User
Joined: 22 Jun 2012 Posts: 57 Location: Chennai
|
|
|
|
The XML message is received from MQ Queue. The same opens,Read the XML message from MQ. And it prase the received XML message to applicaiton data.
I have ran the same program with the above XML (removed the comment line) message. Its working fine. Please help to find the issue in XML comment line. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
All XML comments i did see on the internets are starting/ending with a space, contrary to your XML comment. Don't know if that makes the difference. |
|
Back to top |
|
|
|