Add a xmlns tag to the XML using DBMS_XMLGEN

I'm using the version of Oracle version 10.1.0.4.2.

I want to create an xml file according to some data in the relational database tables. For the same thing, I created object types and discovers with the types of objects, since the data is divided into several tables.

Then, I used DBMS_XMLGEN.getxml to generate xml with queries from the view of the object.

Y at - it an option to add the xmlns attribute in the xml file generated.

Please let me know if any additional details are needed.

If you want to add the namespace declaration to the root element, I don't think it's possible with DBMS_XMLGEN directly.
You can ask DBMS_XMLGEN to treat some of the fields of the object as XML attributes by prefixing with '@' (for example '@my_attribute'), but you can't control which for bounding of the elements.

A possible solution is to add it later, using XSLT, or insertChildXML, but apparently it is not available in your version.

However...

For the same thing, I created object types and discovers with the types of objects, since the data is divided into several tables.

Because the data from different tables, why not use SQL and SQL/XML functions to build the document?
This is simple, simple and needs no additional items.

select xmlelement("Departments",
         xmlattributes('http://xmlns.example.org' as "xmlns")
       , xmlagg(
           xmlelement("Department",
             xmlattributes(d.deptno as "Id")
           , xmlelement("Name", d.dname)
           , xmlelement("Employees"
             , xmlagg(
                 xmlelement("Employee",
                   xmlattributes(e.empno as "Id")
                 , xmlforest(
                     e.ename as "Name"
                   , e.job as "Job"
                   )
                 ) order by e.empno
               )
             )
           ) order by d.deptno
         )
       )
from scott.dept d
     join scott.emp e on e.deptno = d.deptno
group by d.deptno, d.dname
;

Output:


  
    ACCOUNTING
    
      
        CLARK
        MANAGER
      
      
        KING
        PRESIDENT
      
      
        MILLER
        CLERK
      
    
  
  
    RESEARCH
    
      
        SMITH
        CLERK
      
      
        JONES
        MANAGER
      
      
        FORD
        ANALYST
      
    
  
  
    SALES
    
      
        ALLEN
        SALESMAN
      
      
        WARD
        SALESMAN
      
      
        MARTIN
        SALESMAN
      
      
        BLAKE
        MANAGER
      
      
        TURNER
        SALESMAN
      
      
        JAMES
        CLERK
      
    
  

Tags: Database

Similar Questions

  • Add several attribute of a tag in the xml file

    Hello

    I have a donnees_xml in the xml_test_table of the table in the format

    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < CLASS > XII has < / CLASS >
    KATE < TEACHER > < / TEACHER >
    < STUDENT_STRENGTH > 30 < / STUDENT_STRENGTH >
    < 50 OFFICES > < / DESKS >
    < / ROW >
    < ROW >
    B XII < CLASS > < / CLASS >
    < STUDENT_STRENGTH > 40 < / STUDENT_STRENGTH >
    < NUMBER OF GIRLS 15 > < / NUMBER OF GIRLS >
    < NUMBER_OF_BOYS > 25 < / NUMBER_OF_BOYS >
    < / ROW >
    < / LINES >

    I need to change the xml in this format:

    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < CLASS > XII has < / CLASS >
    < age TEACHER subject = "37" = "Math" > KATE < / TEACHER >
    < STUDENT_STRENGTH > 30 < / STUDENT_STRENGTH >
    < 50 OFFICES > < / DESKS >
    < / ROW >
    < ROW >
    B XII < CLASS > < / CLASS >
    < STUDENT_STRENGTH > 40 < / STUDENT_STRENGTH >
    < NUMBER OF GIRLS 15 > < / NUMBER OF GIRLS >
    < NUMBER_OF_BOYS > 25 < / NUMBER_OF_BOYS >
    < / ROW >
    < / LINES >

    You will need to add several attribute to all the 'teacher' in the XML tag.
    I am able to add a single using attribute

    Select insertChildXML (donnees_xml, 'game of LINES/LINES/TEACHER', '@age', ' 37 ") of test_xml_table;

    Thanks in advance

    In this scenario, we have a simple find and replace the XML function using which i can replace the tag with (I understand this is not good was to solve this).

    Why not use two calls separate insertChildXML?
    The premiera adds the attribute to @age, and the other adds the attribute @subject on the result of the first.

  • How to analyze all the data of the particular tag in the xml file

    Hi all

    I have a xml file, who like tags, code, rev_num, type... volunteers. I want to analyze the XML and save all data (code, rev_num...) the unknown tag in a text file. I tried to use a node matching vi, but I do not get the output I have need.attach is my attempt, can someone suggest me or help out me. (Sorry Cant join the XML so I recorded it in a text file.)

    Thank you

    Ankit G

    You must replace the instance of "resource" with "resource [type = 'unknown']." Did you do it?

  • Extract the value between the xml tags in the XML inside the BLOB field

    Hello

    I have a table that contains a BLOB column, this XML file to store column that received from an external source. Now for one of my needs. I need to read that value is the specific XML tag and create the entry in the database.

    Column name DataType
    IDNumber
    RecordBLOB OBJECT

    This is the XML code that is stored in the file inside the BLOB field format. XML below, I need go get AMC1234 there is after < itemName > text < / itemName > I thought to use XMLTYPE, but unfortunately my DBA team does not XML database, I now use UTL_RAW. CAST_TO_VARCHAR2 and recovery entire string, but I am not able to read actual result it takes. Can someone help me remove AMC1234.

    <? XML version = "1.0"? >

    <! DOCTYPE importFile SYSTEM "xyz.dtd" >

    -< importFile >

    -< importResult >

    < mode status = "DΘFINIR" > general failure < / status >

    < statusCode > 1 < / statusCode >

    invalid < errorMsg > list and holiday component < / errorMsg >

    -< returnInfo >

    < itemName > PRQ < / itemName >

    < Valeurelement > CBA < / Valeurelement >

    < / returnInfo >

    -< returnInfo >

    < itemName > LMP < / itemName >

    < Valeurelement > CBA < / Valeurelement >

    < / returnInfo >

    -< returnInfo >

    < itemName > KEY < / itemName >

    < Valeurelement > 9999 < / Valeurelement >

    < / returnInfo >

    -< returnInfo >

    < itemName > text < / itemName >

    < Valeurelement > AMC1234, FIXED_ALL, RED < / Valeurelement >

    < / returnInfo >

    < / importResult >

    < / importFile >


    Thank you

    Without

    Without - try something like...

    with t as (select"

    -

    -

    General failure

    1

    component and invalid vacation list

    -

    PRQ

    ABC

    -

    LMP

    ABC

    -

    KEY

    9999

    -

    Text

    AMC1234, FIXED_ALL, RED

    "the double pass."

    )

    Select Replace (regexp_substr (col,'([^<>']) itemName))

    , replace (regexp_substr (col,'([^<>""]) Valeurelement))

    t

    connection of level <=> ');

  • Replace several tags in the xml file

    Hello

    I have a donnees_xml in the test_xml_table of the table in the format

    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < CLASS > XII has < / CLASS >
    KATE < TEACHER > < / TEACHER >
    < STUDENT_STRENGTH > 30 < / STUDENT_STRENGTH >
    < 50 OFFICES > < / DESKS >
    < / ROW >
    < ROW >
    B XII < CLASS > < / CLASS >
    < STUDENT_STRENGTH > 40 < / STUDENT_STRENGTH >
    < NUMBER OF GIRLS 15 > < / NUMBER OF GIRLS >
    < NUMBER_OF_BOYS > 25 < / NUMBER_OF_BOYS >
    < / ROW >
    < / LINES >

    Need to replace some tags with a new tag (< TEACHER > with < CLASS_TEACHER > and < CLASS > with < CLASS_AND_DIVISION >), the method used is currently
      select regexp_replace(regexp_replace(xml_data,'TEACHER>','CLASS_TEACHER>'),'CLASS>','CLASS_AND_DIVISION>')from test_xml_table ;
    version of database
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE Production 11.2.0.2.0
    AMT for Solaris: 11.2.0.2.0 - Production Version
    NLSRTL Version 11.2.0.2.0 - Production


    Problems I'm here, it's that this returns me a string that I have to convert to XML again and having to use
    the regexp_replace function0 several times. Is there a function XML to aid that can be used to do this, if there is
    no other option like this, is there any function to replace alternative can replace all the necessary tags at once?

    Thanks in advance

    Edited by: M. 13 on October 26, 2012 01:40

    One possible way using XSLT:

    SQL> select xmltransform(xml_data
      2         , xmlparse(document
      3  '
      4    
      5      
      6        
      7      
      8    
      9    
     10      
     11        
     12      
     13    
     14    
     15      
     16        
     17      
     18    
     19  ')
     20  ) as result
     21  from test_xml_table
     22  ;
    
    RESULT
    --------------------------------------------------------------------------------
    
    
     
       XII A 
       KATE 
       30 
       50 
     
     
      XII B
       40 
       15 
       25 
     
    
     
    
  • ThinkStation S20 - add an active tag in the BIOS

    Y does it have that a utility available to we can update the number of assets in the BIOS? I found one for Thinkpad laptops, but not for the thinkstation s20...

    for laptops I've used

    http://support.Lenovo.com/en_US/detail.page?LegacyDocID=MIGR-75237

    Thank you

    My colleague figured this out...

    We have been able to use the winplash utility to update the identification sticker

    He had to put the tag in the "serial number" field and change the update mode "bios update and preserve the DMI.

    He also mentioned that the method flash2.exe than psuturtle should work too

  • Need examples of code to parse the xml using kxml2

    Hello world

    I am a beginner for Blackberry, I want to get the data from the xml file. I look and see the section use of kxml2 is a better choice.

    But I can't find an example code for it on the Blackberry.  Can someone share me?

    I open kxml2.jar, I see xmlParser and kxmlParser, whoever I'm use()?

    Anbody can help me contact how to use kxml2 clearly?

    Thank you very much. Sorry for the bad English.

    --------

    Binh - VietNam

    Ah yes, sorry, I assumed automatically kxml to be used with ksoap2.

    kxml is a j2me parser commonly you can find sources in other forums, for example
    http://www.developer.Nokia.com/community/wiki/How_to_parse_an_XML_file_in_Java_ME_with_kXML
    http://j2mesamples.blogspot.com/2009/04/XML-parsing-in-J2ME.html

  • Image tag with the XML tag

    Hi all

    I want to mark all my images embedded in a CS6 document with an XML tag. I use CS6 on Windows with JavaScript. Any advice would be appreciated. Thank you.

    Rick

    OK, it seems I have to add the element to the structure, and then use "tagging" to apply the item to my image.

    // Get the selected image.
    var image = app.selection[0].getElements()[0];
    // Get the Story element.
    var root = doc.xmlElements.item(0);
    var storyElem = root.xmlElements.item(0);
    // Add the "Image" element to the Story element.
    var imageElem = storyElem.xmlElements.add ("Image");
    // Tag the selected image with the Image tag.
    image.markup (imageElem);
    
  • Add meta description tags to the individual catalogs

    Hi all

    For the life of me I can't understand how to add different meta descriptions for individual catalogs...

    I understood how to add meta keywords, descriptions and titles for each of the products, but I want to be able to do to the individual catalogs.

    My site is www.hashems.com

    Ive been trying for 3 days, please help me.

    The people of the collaborative will give you will also enter through the product pages. So my recommendation is do not actually harm your SEO.

  • Create an image slider using the XML file photo gallery

    Hello!

    I have created a photo gallery and generated an xml file.  I want to implement a cursor image on the home page that performs a simple fade from one image to the other.

    I'm not an expert on jQuery. The BC help section says to add code that retrieves in the XML file and THEN add another code query j who would style images and transitions.

    I don't know how to do this.  Here is my code and it does not work.

    If you have a simple solution, it would be great.

    There is a script called JSSOR

    "< script type =" text/javascript"src ="... / js/jquery-1.9.1.min.js "> < / script >"

    <!-use jssor.slider.mini.js (40 KB) instead for immediate release->

    <!-jssor.slider.mini.js = (jssor.js + jssor.slider.js)->

    < script type = "text/javascript" src = "javascripts/jssor.js" > < / script >

    "< script type =" text/javascript"src="javascripts/jssor.slider.js "> < / script >

    This is the beginning of the code BC gives to pull from the xml file into a div called "Gallery".

    < div id = 'Gallery' > < / div >

    < script type = "text/javascript" >

    {$(function()}

    $.ajax({)

    type: 'GET ',.

          url: " http://www.performanceaire.com/Fahrenheit-images/BannerGallery/Photogallery.XML ", / / replace with an absolute URL of the XML of your gallery of .

    data type: "xml."

    success: {function (xml)}

    {$(xml).find('img').each (function ()}

    location var = ' http://www.performanceaire.com/Fahrenheit-Images/BannerGallery/'; / / Replace with the absolute path to the directory that contains your images

    var url = $(this) .attr ('src');

    var alt = $(this) .attr ('alt');

    $('<li></li>').html (' < a href = "' + place +" + url + ' "> < img src ="' + place + "+ url + '" alt = "' + alt + '" / > < / a > ').appendTo('#gallery');

    });

    }

    });

    });

    This is the code taken from JSSOR to transitions occur, and it does not work... any ideas?

    jQuery (document) .ready (function ($) {}

    var options = {}

    $AutoPlay: true, / / [optional] If auto play, to activate the slide show, this option must be set to true, the default value is false

    $DragOrientation: 1 / / orientation [optional] to drag the slide, 0. drag, 1 horizental, 2 3 vertical or, default value is 1 (note that the $DragOrientation must be the same as $PlayOrientation when $DisplayPieces is more than 1, or in the parking position is not 0)

    };

    var jssor_slider1 = new $JssorSlider$ ("Gallery", options);

    });

    < /script >

    www.performanceaire.com/index-FS.html

    It is perhaps a bit much if you do not top:

    Developers

    http://www.BusinessCatalyst.com/BC-blog/BC-next-liquid-rendering-JSON-new-editing-capabili links-increased-performance

  • the value of the xml column type tag data BLOB

    Hello

    I'm on Oracle 10 g.
    I have a table that has a column as BLOB data type and contains XML data. I need to select specific table records according to a unique tag value of the xml data in the BLOB column. For example:
    The table say Test has two columns: id (integer) and MESG (BLOB)
    The xml in the MESG column message is assumed:
    < message >
    < > 123456 contactphone < / contactphone >
    < contactname > ABCD < / contactname >
    < amount > 9999 < / amount >
    < / message >

    I need to extract only the records where the amount is = 9999

    Help, please. Thanks in advance.

    user12850338 wrote:
    Hi BluShadow,
    Thanks for your reply.
    I confess that if we would have used type xml in the first place, things would have been easier.
    For example, I mentioned three tags in the xml file, but my real data contains some hundreds of tags... :( So it will always be a good idea with this approach.

    Yes, it's a good approach. Oracle has provided built-in XML functionality to manage XML, then of course it's the best thing to use. :)

    For example, you can easily deal with namespaces and repeating nested groups and flatten the data in a table structure. for example

    SQL> ed
    Wrote file afiedt.buf
    
      1  WITH t as (select XMLTYPE('
      2  
      3    
      4      1
      5      1800
      6      
      7        1
      8        28
      9        6
     10        12
     11      
     12      
     13        5
     14        19
     15        1
     16        90
     17      
     18    
     19    
     20      2
     21      2400
     22      
     23        3
     24        14
     25        7
     26        5
     27      
     28    
     29  ') as xml from dual)
     30  -- END OF TEST DATA
     31  select x.country, x.point, y.user_id, y.target, y.state, y.task
     32  from t
     33      ,XMLTABLE(XMLNAMESPACES('http://www.w3.org' as "aa"),
     34                '/RECSET/aa:REC'
     35                PASSING t.xml
     36                COLUMNS country NUMBER PATH '/aa:REC/aa:COUNTRY'
     37                       ,point   NUMBER PATH '/aa:REC/aa:POINT'
     38                       ,user_info XMLTYPE PATH '/aa:REC/*'
     39               ) x
     40      ,XMLTABLE(XMLNAMESPACES('http://www.w3.org' as "aa"),
     41                '/aa:USER_INFO'
     42                PASSING x.user_info
     43                COLUMNS user_id NUMBER PATH '/aa:USER_INFO/aa:USER_ID'
     44                       ,target  NUMBER PATH '/aa:USER_INFO/aa:TARGET'
     45                       ,state   NUMBER PATH '/aa:USER_INFO/aa:STATE'
     46                       ,task    NUMBER PATH '/aa:USER_INFO/aa:TASK'
     47*              ) y
    SQL> /
    
       COUNTRY      POINT    USER_ID     TARGET      STATE       TASK
    ---------- ---------- ---------- ---------- ---------- ----------
             1       1800          1         28          6         12
             1       1800          5         19          1         90
             2       2400          3         14          7          5
    
    SQL>
    
  • How to add content in the xml element?

    I need to insert a word sqrt (plain text without tags) in the xml element of m:msqrt as below:

    enter image description here

    I tried,

         

    var path = (app.activeDocument.fullName.parent.fsName) m:System.NET.SocketAddress.ToString () replace (/ \ / g, ' /'); document path (sample.indd) active

    var xmlPath = (app.activeDocument.fullName.parent.fsName) m:System.NET.SocketAddress.ToString (.replace(/\\/g, '/')) + "" / with_aid2.xml ";"

    xmlFile = file (xmlPath);

    {if (xmlFile.Exists)}

    xmlFile.open ();

    var myString = xmlFile.read ();

    xmlFile.close ();

    myXml = new XML ();

    myXml = XML (myString);

    var msqrtCount = myXml.xpath("//m:msqrt");

    } else {alert (xmlPath + "does not exist!") ;}}

    for (var i = 0; i < msqrtCount.length (); i ++) {}

    var added = msqrtCount [i];

    added.contents = "sqrt";

    }

    I get an error indicates the invalid content property.

    Try this,

    var myDoc = app.activeDocument;
    mySqrtTag(myDoc)
    function mySqrtTag(elm)
    {
        for (var i = 0; i < elm.xmlElements.length; i++)
        {
            if(elm.xmlElements[i].markupTag.name.toString() == "m:msqrt")
            {
                elm.xmlElements[i].insertionPoints[0].contents = "sqrt";
            }
            mySqrtTag(elm.xmlElements[i]);
        }
    }
    
  • How to filter the doc and xml using SDKFileOpenChooser?

    I need to filter only word and xml

    SDKFileOpenChooser openChooser;

    openChooser.AddFilter (291, "App_Filter");   291 for app

    openChooser.ShowDialog ();


    Where to find the ID of the extension for the filter application or any solution?

    To display only the XML using SDKFileOpenChooser files use:

    openChooser.AddFilter (kXMLFileTypeInfoID, "files (xml)" "") XML;

    To Word files, try to use kMSWordFileTypeInfoID instead.

  • global variables for the XML plugin problem

    Hello world

    recently I started working on a dialog box SOUTH, where the user can load the *.xml files in DIAdem.So much my code for the button looks like this:

    ....

    Call the FileNameGet ('ALL', 'FileRead","*.xml")
    Call DataFileLoad (FileDlgName, "XML_Plugin", "Load")

    ....

    And I must say that it works very well! I am able to load all listed in the devices file. BUT when I tried a number of loading devices, I used a global variable, that I defined in the vbscript file that I load the SOUTH since, I've noticed that global variables, I've defined with GlobalDim are not defined in the vbs.:mansurprised of XML_Pluging:

    Then I started to experiment and so far without success, no matter where I define global variables, in my plugin *.xml all not defined! The native commands even and DIAdem functrions does not work. If I run the script in tiara, it shows no errors, but when I use the plugin to open a file, then it gives an error. For example, MsgBox is not allowed.

    I used the plugin example for *.xml, which was published on the Web site of NOR, and I made a few changes. But overall I have it has not corrupted and I kept the same structure:

    Void ReadStore (File)

    Dim XmlFile: xmlFile = File.Info.FullPath
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'open the file '.
    OpenXMLFile xmlFile

    End Sub

    Void OpenXMLFile (xmlFile)
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Open MS - Xml Parser
    'Create the ActiveX object for the Microsoft XML parser.
    Dim XDoc: set xDoc = CreateObject ("MSXML2. DOMDocument.3.0")

    "Try to load the XML document
    If xDoc.Load (xmlFile) = False Then
    "Failed to load the document XML.
    RaiseError ' unable to load XML document!
    End If

    protected originalLocale: originalLocale = Getlocalte
    "SetLocale" en - us ".

    "The XML document loaded successfully!
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    '----------------------------------------------
    "Read the header information.
    '----------------------------------------------

    Here, I have read some values of the header and then I loop on all devices present in the file!

    So basically I have two subroutines and that's all.

    SetLocale originalLocale

    End Sub

    So what I am doing wrong? Why global variables and other functions do not work. Is it because there is xml code in the script this way or it's a version problem?

    I use DIAdem 10.2. If I use global variables in other vbscripts, I use to draw curves for example I have no problem. Now I'm no *.xml code and no subroutines.

    I'd appreciate any solution that will make my *.xml plugin to work.

    Hi fscommand.

    It is expected all behavior.  Use XML, as all VBScript DataPlugins, runs in a separate VBScript host of the DIAdem VBScript host.  DIAdem VBScript host adds all global variables green and Red controls global to host Microsoft VBScript standard.  Use VBScript host has its own special abilities (file object, root object), but there is NO access to Globals green or red blanket orders in the reception of DIAdem VBScript.  Your SUDialog runs in a third host VBScript, which is separated from the other two and the other two are not capabilities (command SUDialog callback functions), but the SUDialog VBScript host and VBScript tiara share all global variables green and Red orders overall.

    Normally all blue VBScript commands are allowed in all 3 VBScripts hosts, but in the case of the DataPlugins MsgBox and InputBox functions were especially restrained because the dialogues could cause a lot of trouble with the DataFinder.  In fact, they have been allowed to 9.1 tiara which was the latest version of tiara for the DataFinder appear.

    So, why do you want to pass information between the XML use and tiara?  If you want to use to share information with DIAdem, then you should just expose every piece of information as a new property in the data portal, which can read and use the code VBScript DIAdem.  The path of the XML file is already available inside the use of XML.  What other information in the call VBScript DIAdem do you need to share with the use?

    Brad Turpin

    Tiara Product Support Engineer
    National Instruments

  • How to extract the value of a tag XML using regular Expressions

    We get a response XML from a WEB SERVICE.

    I convert it to VARCHAR2.

    Now, I want to get the real answer that is inside the tag of the response.

    I tried this:

    DECLARE

    V_1 VARCHAR2 (30000): = ' < soap: Body > < ns:ProcessArgusFeedsResponse xmlns:ns = "urn: PegaRULES:SOAP:ArgusToPegaFeeds:Services" > ' |

    '< response > good < / answer >< / ns:ProcessArgusFeedsResponse > < / soap: Body > ';

    v_response VARCHAR2 (100);

    BEGIN

    DBMS_OUTPUT. PUT_LINE (V_1);

    v_response: = REGEXP_SUBSTR (v_1, ' / < >(.+?) < \/Response > answer /');

    dbms_output.put_line (v_response);

    END;

    It does not work.

    Any help would be greatly appreicated.

    Hello

    user12240205 wrote:

    We get a response XML from a WEB SERVICE.

    I convert it to VARCHAR2.

    Why?  XML has its own native ways of analysis; Why not use them?

    If you use regular expressions, then REGEXP_REPLACE, as shown above, is a good option in Oracle 10, but starting in Oracle 11.1, you can use REGEXP_SUBSTR like this:

    REGEXP_SUBSTR (v_1

    , '(.+?)'

    1

    1

    NULL

    1

    )

    The 6th argument is like a backreference; "He tells REGEXP_SUBSTR did not return to the entire organization, but only the part inside the 1st left '(' et correspondant à sa droite).

    The '?' to make it non-greedy is necessary only if v_1 can contain more than one response.

    Now, I want to get the real answer that is inside the tag of the response.

    I tried this:

    DECLARE

    V_1 VARCHAR2 (30000): = "" |

    'Good';

    v_response VARCHAR2 (100);

    BEGIN

    DBMS_OUTPUT. PUT_LINE (V_1);

    v_response: = REGEXP_SUBSTR (v_1, ' /(. +?)) <\ esponse="">/');

    dbms_output.put_line (v_response);

    END;

    It does not work.

    That's because it's looking for a slash ("/") before the '' tag and another after the ' tag.

    The backslash ("\") is not necessary here, but it is not nothing wrong.

Maybe you are looking for