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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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