Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
XML parse query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Tue Oct 06, 2009 3:46 pm    Post subject: XML parse query
Reply with quote

Hi Team,

I had small query regarding XML parse Command.

When I am running XML parse command , the event handler sometimes recognising space between start and end tag as Contain Characters and sometimes not.

Like below tag – Ideally the parse command should enter in Contain Characters condition but it’s not behaving like that.

<A> </A>

Could you please someone help me.
Back to top
View user's profile Send private message

ashutosh.pr

New User


Joined: 13 Apr 2007
Posts: 36
Location: Pune

PostPosted: Tue Oct 06, 2009 9:56 pm    Post subject:
Reply with quote

Hi Yogeshwar,
Is your program failing when reading spaces? I suggest you change your approach to read the data. If spaces are being read where you are expecting the event handler to return some data being read, then move one more event forward and you should get the data.
eg. <A>Data </A> , if you encounter spaces after the data, move one more event forward to get the end of the tag.
Similarly, if you get <A> Data</A> , i.e data followed by spaces, make one more read and get the data.

Do not expect the parser to return the data you want after some no of reads. Instead keep reading, till you get to the data. Start of tags and end of tags will help you recognize that you have read the correct data.

I had written a program to read XML a few years back, and the one thing I remember about it was that it was very specific to the XML structure that it was reading.
The key thing is to know the sequence in which the different components will be read and then manipulate the logic accordingly.

Thanks,
Ashutosh
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us