Solved

oracle xml

Posted on 2011-03-02
3
373 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 31

Expert Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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 post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now