Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Shell_scripts_xml_file

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-28-2013
p.j.satyaveni p.j.satyaveni is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 28 February 2013, 3:31 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Shell_scripts_xml_file

Hi develope one shell in that i use sql query.
i want to display that query output in .xmlfile
after running the script output file is generated but it doesnt diplays data and throws an error.following is the output of the .xml file

Code:
XMLELEMENT("ALL",XMLAGG(XMLELEMENT("DATABASE_OBJECTS",XMLFOREST(OWNER,OBJECT_TYP
<All><DATABASE_OBJECTS><OWNER>APPS</OWNER><OBJECT_TYPE>FUNCTION</OBJECT_TYPE><
OB

if i use otherathan .xml file (like csv etc) i got the result, but for only .xml file i didnt got the data.
and the query inside script is

Code:
select 
xmlelement("All", 
xmlagg(
XMLELEMENT ("DATABASE_OBJECTS",
XMLFOREST (owner,
object_type,
object_name,
object_user_name,
physical_name
))
)
).getClobVal()
FROM xxhex_custom_objects;

this query is working fine but in shell script only it is not generated any output.
Please help me to solve this issue.

Last edited by Franklin52; 02-28-2013 at 04:39 AM.. Reason: Please use code tags for data and code samples
Sponsored Links
    #2  
Old Unix and Linux 02-28-2013
PikK45 PikK45 is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 26 November 2014, 5:10 AM EST
Location: Chennai
Posts: 567
Thanks: 43
Thanked 74 Times in 72 Posts
So you output is OK when you are saving that to a csv or a text file? and it throws an error only when you attempt to save in xml file?

Why don't u try saving the output in a TEMP file and rename it to file.xml??
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -4. The time now is 07:07 AM.