Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts GETMAIN/FREEMAIN query Suja.Sai CICS 9 Tue Jan 31, 2017 12:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us