Help in removing XML tag !!!1

Hi All,
i have wrote the following query
SELECT '<ns0:Employee_Details xmlns:ns0="http://BizTalk_Server_Project1.Employee_DesirableFormat">'
||chr(10)||dbms_xmlgen.getxmltype('SELECT xmlforest(emp_id, name, dept_id, xmlforest(add1,add2) AS Address,city) As Employees
FROM EMPLOYEES WHERE EMP_ID =' ||101)||chr(10)|| '</ns0:Employee_Details>' AS XML
from Dual;
and out put is :
- <ns:Emp xmlns:ns="http://BizTalk_Server_Project1.Employee_DesirableFormat">
- <ROWSET>
- <ROW>
- <EMPLOYEES>
<EMP_ID>101</EMP_ID>
<NAME>KING</NAME>
<DEPT_ID>10</DEPT_ID>
- <ADDRESS>
<ADD1>PH-1</ADD1>
<ADD2>SEC-2</ADD2>
</ADDRESS>
<CITY>abcd</CITY>
</EMPLOYEES>
</ROW>
</ROWSET>
</ns:Emp>
Now i want to remove the <Rowset> and <Row> tag in my result...... can i do from above query by making any changes.....or if there is another way ...please let me know.....
Thanks

Now i want to remove the <Rowset> and <Row> tag in my resultJust use EXTARCT:
SQL> select '<ns0:Employee_Details xmlns:ns0="http://BizTalk_Server_Project1.Employee_DesirableFormat">'
       || dbms_xmlgen.getxmltype (
             'select xmlforest(empno, ename, deptno, xmlforest(job) as job,sal) as employees from emp where empno ='
             || 7788).extract ('ROWSET/ROW/*')
       || '</ns0:Employee_Details>' as xml
  from dual
XML                                                                            
<ns0:Employee_Details xmlns:ns0 = "http://BizTalk_Server_Project1.Employee_DesirableFormat">
    <EMPLOYEES>
        <EMPNO>7788</EMPNO>
        <ENAME>SCOTT</ENAME>
        <DEPTNO>20</DEPTNO>
        <JOB>
            <JOB>ANALYST</JOB>
        </JOB>
        <SAL>3000</SAL>
    </EMPLOYEES>
</ns0:Employee_Details>
1 row selected.

Similar Messages

  • Remove XML tags from XML element in Oracle

    Hi,
    I have a requirement where I have to remove all the xml tags from xml element with banks, currently I'm using replace 4 times to replace all different types of xml tags, performance is really bad. is there any better option to remove xml tags from xml data leaving the actual data. please find the example data below.
    select
    TO_CLOB(REPLACE(REPLACE(REPLACE(REPLACE
    ('<Concatcolumn><ConcatGroupID>MyText Data goes here </ConcatGroupID><ConcatGroupID>Data agian</ConcatGroupID></Concatcolumn>','<ConcatGroupID>'),'<Concatcolumn>'),'</ConcatGroupID>',';'),';</Concatcolumn>')) AS Concatcolumn
    from dual
    **************Out put*************
    MyText Data goes here ;Data agian

    One way is to use xquery:
    SQL> with t as
    select xmltype('<Concatcolumn>
                          <ConcatGroupID>MyText Data goes here </ConcatGroupID><ConcatGroupID>Data agian</ConcatGroupID></Concatcolumn>'
       ) xml from dual
    select xmlquery('string-join(//text(), ";")' passing xml returning content).getclobval() xml from t
    XML                                                              
    MyText Data goes here ;Data agian                                
    1 row selected.

  • Remove XML Tags with White space.

    Hi All, I have a scenario like the below code where I have empty spaces in few columns of my tables. I create XML of the data and send it. There is a lot of code such and I can't add ISNULL() on each and every column. Is there any simple one line code working
    with the XML so that I can remove the tags with only empty spaces. TIA.
    DECLARE @xml1 VARCHAR(max)
    DECLARE @xml2 VARCHAR(max)
    set @xml1 = (SELECT 1 AS Col11, ' ' AS Col21, 'ABC' AS Col31 FOR XML RAW, ELEMENTS)
    set @xml2 = (SELECT 2 AS Col12, ' ' AS Col22, 'ABC' AS Col32 FOR XML RAW, ELEMENTS)
    DECLARE @xml xml;
    SET @xml = Cast('<ROOT>' + ISNULL(@xml1, '') + ISNULL(@xml2, '') + '</ROOT>' as xml)
    SET @xml.modify('delete //*[not(node())]');
    -- Some Way to Remove the XML Tags with Empty space here.
    select @xml as XMLString
    /* Output of the Above script.
    <ROOT>
    <row>
    <Col11>1</Col11>
    <Col21> </Col21> -- This XML Tag with a white space should be removed
    <Col31>ABC</Col31>
    </row>
    <row>
    <Col12>2</Col12>
    <Col22> </Col22> -- This XML Tag with a white space should be removed
    <Col32>ABC</Col32>
    </row>
    </ROOT>
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

    It would have helped if there had been a trim() function in XQuery.
    With some trial and error and inventive thinking I came up with this:
    <span style="color:Blue">SET</span> @xml.modify(<span style="color:#A31515">'delete //*[. <= " "]'</span>);
    As they say: it seems to work. But I leave no warranties.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Wow Erland  this
    seems to work, I need to test it against my data and update on this. Thanks again.
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

  • Urgent help needed for XML Tags using XMLForest()

    Folks
    I need some urgent help regarding getting use defined tag in your
    XML output.
    For this I am using XMLElement and XMLForest which seems to work fine
    when used at the SQL prompt but when used in a procedure throws and error
    SQL> Select SYS_XMLAGG(XMLElement("SDI",
                                       XMLForest(sdi_num)))
         From sdi
         where sdi_num = 22261;- WORKS FINE
    But when used in a procedure,doesnt seem to work
    Declare
        queryCtx  DBMS_XMLQuery.ctxType;
        v_xml     VARCHAR2(32767);
        v_xmlClob CLOB;
        BEGIN
        v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
                                             XMLFOREST(sdi_num)))
        From sdi
        where sdi_num = 22261';
        queryCtx :=DBMS_XMLQuery.newContext(v_xml);
        v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
        display_xml(v_xmlClob);
    End;
    CREATE OR REPLACE PROCEDURE  display_xml(result IN OUT NOCOPY CLOB)
    AS
         xmlstr varchar2(32767);
         line varchar2(2000);
    BEGIN
         xmlstr:=dbms_lob.SUBSTR(result,32767);
         LOOP
         EXIT WHEN xmlstr is null;
         line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
         dbms_output.put_line('.'||line);
         xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
         END LOOP;
    end;
    SQL> /
    .<?xml version = '1.0'?>
    .<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
    XML tag name.</ERROR>
    PL/SQL procedure successfully completed.
    SQL>HELP is appreciated as to where I am going wrong?

    Hi,
    if you want to transform something to something else, you should declare, what is your source.
    I would prefer to use plain XSL-Transformations, because you have a lot more options to transform your source and you can even better determine, how your output should looks like.
    Kind regards,
    Hendrik

  • Remove XML tags in the File Adapter

    Hi,
    I have a JDBC to File interface. However, there is a requirement to remove some of the XML tags from XML produced by the File Adapter.
    For example,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_XML xmlns:ns0="namespace">
       <XMLIntegration>
             <Prices COLUMNS="Index, Date, Price">
             <Index>Fuel</Index>
             <Date>2007-05-01 00:00:00.0</Date>
             <Price>0</Price>
            </Prices>
          <Prices COLUMNS="Index, Date, Price"/>
      </XMLIntegration>
    </ns0:MT_XML>
    needs to be changed to
       <XMLIntegration>
             <Prices COLUMNS="Index, Date, Price">
             Fuel, 2007-05-01 00:00:00.0, 120.65
            </Prices>
      </XMLIntegration>
    Does anyone know how to do this? I'm using the File Content Conversion Message Protocol but I'm not having much success

    hi,
    you just need to have this:
    <XMLIntegration>
             <Prices COLUMNS="Index, Date, Price">
             Fuel, 2007-05-01 00:00:00.0, 120.65
            </Prices>
      </XMLIntegration>
    as your target message in your mapping
    and map all values to Prices tag
    you don't need no content conversion - just the mapping
    Regards,
    michal

  • Facing problem while removing XML tags which has been generated from SAP

    Hi All,
    I am facing problem in MII, while i trying to remove 1st 2 XML tags of XML as generated from SAP.
    Here is XML which has been generated from SAP
    u201C<?xml version="1.0"; encoding="UTF-8"?>
    <ZCIFSCHEDULE>
    <SCHEDULE>
    <MESSAGE_TYPE/>
    <SITE>A300</SITE>
    <SHOP_ORDER>2012020856</SHOP_ORDER>
    <QTY_TO_BUILD>6.000<;/QTY_TO_BUILD>
    <DATE_TIME>08-FEB-2012 20:57:21 +05:30</DATE_TIME>
    <OPERATION>PRS</OPERATION>
    <ITEM>IN-CT00228</ITEM>
    <DPICS_CODE>1229</DPICS_CODE>
    <REVISION/>
    <CYC_TIME_CURING/>
    <FLAG_AGING/>
    <AGING_MIN/>
    <PRODUCTION_VERSION/>
    <CYC_TIME_OC/>
    <CYC_TIME/>
    </SCHEDULE>
    </ZCIFSCHEDULE>u201D
    From above i want to remove 1st 2 tags and last one tag i.e.  u201C<?xml version="1.0"; encoding="UTF-8"?> , <ZCIFSCHEDULE> and last tag ZCIFSCHEDULE>u201D
    Its urgent!
    Did anyone done regarding this issues. Thanks in advance.
    Kind Regards,
    Praveen Reddy

    Hi Praveen,
    Are you trying to make the xml into a string?  I think if you remove the first tag, it will either automagically reappear or it will throw and error as being poorly formed xml. 
    In general, you can remove the nodes by the use of indexes.  Since you are operating at the root level, I am not sure how well it will work, but if your xml is in a property, you can reference the specific nodes by something like this:  myXML.Output{/*[1]} which if you put it in a tracer will display the contents of the first node (or blank if there are child nodes).  The node index can be dynamically set, but start with the simple hard coded one.  I would also start at the lowest child level to verify that it is working properly (a tracer will display the contents specified by the index).  You can also google xml indices (or indexes) and it will point to some other useful xml operators.
    I suggest that you play around with it and also work with the Link Types (hint: removeXML).
    Regards,
    Mike

  • Multiple Return to Single Return is Removing XML Tag

    Dear All,
    I'm Using  -  InDesignCS3 + WinXP + VB6.
    I've a InDesign file which is created by XML Import (Our Customers needs XML Output also at the End).
    After importing i've done few modifications (Moved Figs & Captions to frames by PlaceXML method).
    At this stage an Extra Paragraph Return (where the Figure placed while import, before moving to frame) is available.
    When i tried to remove this by replace, XML Tag for the Figures are also deleted from the XML Structure of the Document.
    Is there any other way to do this? - Please Suggest
    Thanks in Advance,
    SaRaVaNaN.N...

    Hai,
    Here is a Simple Example for my Question.
    Ex: Import the following XML and from the XML Structure (Ctrl+Alt+1) Move <figure> to a new Frame.
          You'll see an extra paragraph return between those two paragraphs.
              <root><para>...text 1...</para>
              <figure><title>fig.1</title><img href="myFig1.jpg"/><caption>about the figure</caption></figure>
              <para>...text 2...</para></root>
    GoTo Story Editor (Ctrl+Y). You'll see as follows:
              [x]para>...text 1...<para[x]
              [x]figure]
              [x]para>...text 2...<para[x]
    After Replacing '^b^b' to '^b' it looks like below:
              [x]para>...text 1...<para[x]
              [x]para>...text 2...<para[x]
    Figure Tag is removed from the XML Structure and Story Editor. Is there any way to remove this extra pragraph reture with keeping the XML Structure?
    Thanks...

  • Unmapping styles to remove XML tags

    I have an AppleScript that sets up an XML Export Map for style to tag mapping, using a known set of customer styles, and I'm adding a check for non-standard (unmapped) styles to include those as well as unknownstyle tags. This is all working well.
    What I'd like to do now is create an Unmap script that would remove all style level tags, leaving just frame level tags. The customer is working with K4, and sometimes articles will be reworked after initial processing, or be copied to start a new version of the file. So we'd like tags out for a cleaner file at that stage, which they'll then retag at the end of the editing prior to export.
    While this is easy through the UI (edit style to tag mapping, and choose [Not Mapped] as the target tag for a given style sheet), I can't find any way of doing the same through AppleScript. I have tried setting the markup tag property to "", null, 0, [Not Mapped], and a few other things, without success.
    Does anyone know of a way of doing this, or know if it is unsupported on the script side so I can stop looking?
    Thanks, John

    Hi Marc,
    It looks like that is the way to go. I was hoping to find a way to unmap specific style sheets, since that would be the direct opposite of the process used to add style sheet level tags in the first place. (And the articles also contain frame level tags, which I do not want disturbed by this process.) But while that action is possible through the UI, it does not appear to be supported via scripting.
    However, by looping through and untagging XML elements of XML elements of the main XML element, the result appears to be correct. I'm not entirely clear why this is working, since the second level is not just the frame level tags, but the results look good, so as long as this keeps working I won't worry about exactly why.
    Thanks,
    - John

  • Help me with XML tag !!!

    i want to build an interated application
    Example : when user press 1 button (soft key on mobile phone) , it will direct to a page . And press 2 to go to another page.
    I have tried to use SimpleBind,SimpleMatch,SimpleTask
    But i don't know how to recognine the event that the key was pressed and how to get it (how to compare with the value represent to 1 button).
    I think that i should use the tag SimpleSwitch,SimpleCase to compare the value but it require the name of the formfield ,and i don't know get(set) the name of the event that the 1 button was pressed .
    Thank.
    F.Redondo

    you can add <SimpleAction target="http://host/..." type="accept" .../> to assign the action to the primary button and <SimpleAction target="http://host/..." type="options" .../> to assign the secondary key

  • Help: How do we retain XML tags inside BPEL

    I have scenario where the entire input (XML) needs to be converted as string object and passed to Java service (WSIF). getVariableData is removing XML tags.
    Input is a XML document with XML Signature in it. Without tags, Java code is not able to verify the signature.
    I am using Apache XML Security libraries. In order for me to verify, code creates Document object (org.w3c.dom.Document) from an inputstream.
    Any help is much appreiciated.

    Hi Clemens,
    First of all, thanks for the quick response. I would appreciate if you could help me little more to understand your suggestion. Currently, my BPEL process input is coming in with a structure, which includes XML information to load invoice along with its digital signature.
    Currently, I am trying to include an activity of Assignement after receiveInput activity to create an Xpath expression of something like this..
    concat(concat("<SignedInvoice>",concat(orcl:get-content-as-string(bpws:getVariableData('inputVariable','payload','/client:SignedInvoice/ns2:EM_VOUCHER_IN')),orcl:get-content-as-string(bpws:getVariableData('inputVariable','payload','/client:SignedInvoice/ns3:Signature')))) , "</SignedInvoice>")
    Where would I be implementing your suggestion of casting with org.w3c.dom.Element? would it be in the expression builder or does it need to be done somewhere else.
    Thanks again..
    Ramesh

  • Find XML Tags then apply para style

    Hi everyone,
    I need your help for find xml tags and apply para graph style in InDesign CS2. We have 200 xml files apply only 7 type of paragraph styles so any one help and any JS/Apply script or any other find and replace method. I am really appreciate of my bottom of heart.
    thank you so much.

    Hi,
    Try:
    #include "../XML Rules/glue code.jsx";
    var myDoc = app.documents.item(0);
    var myRuleSet = new Array (new applyParaStyle());
    with(myDoc){
            var elements = xmlElements;
            __processRuleSet(elements.item(0), myRuleSet);
              function applyParaStyle(){
                        this.name = "Xp";
                        this.xpath = "//restaurant_name";
                        this.apply = function(myElement, myRuleProcessor){
                                  with(myElement){
                    switch(insertionPoints[0].parentTextFrames[0].parentPage.appliedMaster.name){
                        case "X-Master":                   
                        app.select(texts);
                        app.selection[0].fillColor = myDoc.colors.item("xxxx");
                        break;
                        case "guide-Scotland":
                        app.select(texts);
                        app.selection[0].fillColor = myDoc.colors.item("scotland");
                        default:                   
                        break;
                                  return true;

  • Getting xml tags for PO releases.

    I need some help in getting xml tags for PO releases.
    When I refer metalink they gave me the following for Std PO.
    Create a new Standard Purchase Order and DO NOT approve it. Let it be in Incomplete status. Go to
    concurrent requests and run the 'PO Output for Communication' concurrent
    program will the following parameters:
    Print Selection: All
    Purchase Order Number From: The PO # you just created
    To: The PO # you just created
    Test: Debug
    May I know for PO releases what are additional parameters.I tried to enter release numbers in addition to the above.Bit it did not work,..
    I am having issue in getting buyer contact phone for PO releases.So I am trying to see if the work_tele_phone is available for Po releases xml tags.
    Can anyone please advise
    prasamb

    To get the tag name, you can use the following XSL stylesheet:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="node()">
    <xsl:value-of select="name()"/> <xsl:text> </xsl:text>
    <xsl:apply-templates/>
    </xsl:template>
    </xsl:stylesheet>

  • XML help removing the tags

    Here's the actionscript and sample XML which is working just
    fine with the exception being all my XML tags are displaying in the
    dynamic text fields and the images aren't loading because it can't
    find <image>images/this.jpg</image>
    Any assist will be rewarded in the after life.

    I found the answer. I was missing the firstChild reference at
    the end of each call.
    myText.text =
    xmlDoc_xml.firstChild.childNodes[n].firstChild.firstChild;
    btQ.loc.text =
    xmlDoc_xml.firstChild.childNodes[n].firstChild.nextSibling.firstChild;
    btQ.myLoader.load(xmlDoc_xml.firstChild.childNodes[n].firstChild.nextSibling.nextSibling. firstChild);

  • Removing XML definition & XML tage from the XML message....

    Dear All,
    We are using PI 7.1 and implementing a scenario in which we need to send a signed payment message to our partner, our implemented scenario goes as follows:
    1) We are using SOAP without header to send the message.
    2) We are signing the payload using our own java code as UDF in graphical mapping.
    3) the main issue that we have is that in the final XML message which is being sent to our partnet, XMl definition and the topmode XML tage are again added to the signed message. Please see the following for reference:
    Source Message:
    We are using only I node in the graphical mapping and one UDF to sign in between the source and the target node. So after signingwe get the following in the target node:
    Signed Message
    0u201A#u0152# *u2020Hu2020÷ ### u201A#}0u201A#y###1#0 ##+######0u201A#h# *u2020Hu2020÷ ### u201A#Y#u201A#U
    u201A#ý0u201A#¸0u201A#  ######5gu0152yu2022ݬ½´b#¿#u2019 u01780 # *u2020Hu2020÷ #####0�Ý1#0 ##U####US1#0###U# ##VeriSign, Inc.1#0###U####VeriSign Trust Network1;09##U### BLAH BLAH BLAH SOME VERISGIN CERTIFICATE SIGNING INFORMATION
    but the final message that get through the SOAP and reaches our partner look liks the following:
    , as all this is appearing twice in our final message.
    I'll appriciate if anyone can help us finding a solution for that, as we tried to remove it in our java class at the adapter level in the module tab, but that produces java error.
    Regards,

    Vijaya, we already have solved this problem by creating an EJB and adding it to SOAP Adapter processing modules, so rather signing our payload in the UDF in graphical mapping we are now signing the payload in the SOAP adapter module and removing any unwarranted characters etc over there as well. We cannot send SOAP with header in our scenario as it is adding hell lot of extra bites that our partner system cannot understand, so we have adapted the EJB way of solving it. Thanks anyways for your suggestion.
    Athar Ullah Khan

  • Need help in extracting value from an xml tag.

    Hi ALL,
    Good Morning to all, i have problem in fetching a value from a xml tag. I have created a xml schema based on the schema i have created a xmltype table and inserted a value to the table. When i am trying to fetch a value from a particular tag i am unable to do so.. Kindly help me to solve this. Here by i am posting all the workings i have done...
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/chipsxml.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/chipsxml.xsd"
    xmlns:samp="http://www.oradev.com/chipsxml.xsd"
    version="1.0">
    <element name="Field1">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>          
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsxmltable1 (
    id number, XMLDATA XmlType)
    XMLTYPE XMLDATA STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/chipsxml.xsd"
    ELEMENT "Field1";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsxmltable VALUES(
    xmltype.createxml('<?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd" >
    <UTI>
    <U01>No</U01>
    <U02>Y</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>     
    <U04>Y</U04>
    <U05>Y</U05>          
    </UTI>
    </samp:Field1>'));
    To show the data as a field with structure:
    1. Query:
    Select * from chipsxmltable1;
    Output:
    ID XMLDATA
    1 <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    2. Query: (Both the query displays the same Output)
         SELECT X.xmldata.getClobVal() "XMLDATA" FROM chipsxmltable1 X;
         select extract(XMLDATA, '/Field1').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    XMLDATA
    <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    To show the data as a single string without structure using "getstringval()":
    3. Query
         select extract(XMLDATA, '//text()').getstringval() "CHIPS - XML" from chipsxmltable1 x;
    OUtput:
    CHIPS - XML
    NoNoYYYYYY
    To show the data as a single string without structure using "getclobval()":
    4.Query
         select extract(XMLDATA, '//text()').getClobVal() "CHIPS - XML" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    NoNoYYYYYY
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACT" function:
    6.Query:
         select extract(XMLDATA, '/Field1/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    The above queries are not fetching the value.
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACTVALUE" function:
    7. Query:
         select extractValue(XMLDATA, '/Field1/UTI') "XMLDATA" from chipsxmltable1 x;
         select extractValue(XMLDATA, '/Field1/UTI/U01') "XMLDATA" from chipsxmltable1 x;
    Output:
    X
    The above queries are not fetching the value.
    My question is:
    How to fetch values from xml tag when the value are inserted through xml schema?
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.

    Hi,
    You need to declare the namespace of each element used in the XPath expression, like this :
    SQL> select extractvalue( XMLDATA
      2                     , '/samp:Field1/UTI/U01'
      3                     , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"' ) "XMLDATA"
      4  from chipsxmltable1 x
      5  ;
    XMLDATA
    No
    SQL> select extract( XMLDATA
      2                , '/samp:Field1/UTI'
      3                , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"'
      4                ).getstringval() "XMLDATA"
      5  from chipsxmltable1 x
      6  ;
    XMLDATA
    <UTI>
      <U01>No</U01>
      <U02>Y</U02>
      <U03>Y</U03>
      <U03a>Y</U03a>
      <U03b>Y</U03b>
      <U03c>Y</U03c>
      <U04>Y</U04>
      <U05>Y</U05>
    </UTI>
    Please see EXTRACT and EXTRACTVALUE documentation :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions051.htm#i1006712
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions052.htm#SQLRF06173
    BTW, "XMLDATA" is a pseudo-column used by Oracle. I don't know if it'll ever cause any conflict but maybe you should rename your column.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns010.htm#SQLRF00256
    Regards.

Maybe you are looking for

  • Only a few songs show up in a playlist on my iPhone, even though all of the songs in the playlist are on my phone. How do I fix this?

    I uploaded a playlist onto my iPhone.  After going into Music, and into the specific playlist, only one song showed up in the playlist.  After that, I decided to search my phone to see if any of the other songs had made it on there.  All of the songs

  • Is it possible to make db_recover more verbose?

    If you use db_recover there seems to be never anything on the standard output. I'd like to get an info from db_recover what it has done (if anything). db_recover -v results in nothing, if done again results in Finding last valid log LSN: file: 1 offs

  • Using a Collection in an 'IN' Clause

    Hi, I would like to create either a nested table or index-by table to aggregate a set of record ids (eg. social security numbers). Then I would like to use the nested table in an IN clause. Example: TYPE SSN_TABLE IS TABLE OF EMP.SSN%TYPE; v_SSNs SSN

  • BPM: Message Stucked in Queue on Error even after Cancel Process

    Hi all, We have a scenario where we are using BPM to call RFCs in sequence using BPM. In case of exception, we make use of exception branch and canel the process. But even after doing so, failed messages are stucked in queue and if a new message come

  • Have problem with update AsyncOS

    We have proxy ISA 2006 and we have Ironport C150 ISA proxy authenticated users but when i fill field parametrs user and password our proxy logs showed not authorize /// user:anonymouse connect to update server. Im reading about password policy not su