Solved

oracle xml

Posted on 2011-03-02
3
382 Views
Last Modified: 2012-05-11
experts.. How do i output a xml in dbms_output.put_line in an anonymous block? I have a function which returns a  xmltype and I want to test the output of this function. I have an anonymous block as

set serveroutput on;
declare
v_xml xmltype;
begin
v_xml:=func_name(1,'abc');
dbms_output.put_line('vxml is' || v_xml);
end;

This is giving an error. How do I see what the xml has in it? Is there another method in dbms_output??
0
Comment
Question by:chickanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:Aaron Shilo
ID: 35018686
what is the error ?
0
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 500 total points
ID: 35019217
hi

here are two options for XML

select xmltype('<x><y><z>123</z></y></x>') from dual;
select xmlserialize(document xmltype('<x><y><z>123</z></y></x>')) from dual;
0
 
LVL 32

Expert Comment

by:awking00
ID: 35029041
What does your function look like?
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question