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
 

 

How to extract source name from XML

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ANIRUDH A

New User


Joined: 31 Aug 2015
Posts: 4
Location: india

PostPosted: Mon Aug 31, 2015 3:34 pm    Post subject: How to extract source name from XML
Reply with quote

Hi All,

I have an XML file stored in DB2 table.I want to extract the source name from the table. Can anyone explain me what is meant by source in xml and how to extract source name from XML.

Thanks in advance.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Aug 31, 2015 3:55 pm    Post subject: Reply to: How to extract source name from XML
Reply with quote

I'm sure that the XML processing in DB2 is documented. What is it about the documentation that doesn't answer your question? Is this some homework, or some challenge?
Back to top
View user's profile Send private message
ANIRUDH A

New User


Joined: 31 Aug 2015
Posts: 4
Location: india

PostPosted: Mon Aug 31, 2015 4:23 pm    Post subject: Reply to: How to extract source name from XML
Reply with quote

Hi Bill,

I am new to XML. I want to extract root document name(source) from any XML.I used the code :

Code:
select xmlcast(xmlquery('name(/*)' PASSING source_data ) as CHAR(30))
  from table ;


I read the manual and wrote this code but I did not get how to fetch the source name. Did not understand the exact usage of name function in xml.Does it by default gives the source name ?
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Locating the source code. Raghur CLIST & REXX 17 Mon Apr 04, 2016 2:29 pm
No new posts Sort Logic to extract data scorp_rahul23 DFSORT/ICETOOL 13 Tue Mar 01, 2016 1:22 am
No new posts how to extract the member name ? jackzhang75 CLIST & REXX 1 Wed Feb 17, 2016 9:21 pm
No new posts Extract specific step spool data enrico-sorichetti JCL & VSAM 1 Thu Feb 04, 2016 9:48 am
No new posts Utility to extract dsn info from conc... Lynne Schuler PL/I & Assembler 11 Tue Jan 26, 2016 6:36 am


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