Solved

oracle xml

Posted on 2011-03-02
3
377 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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 …
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
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.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

861 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