Clearing unwanted Tags using XmlElement()

Hi,
Using the following Select clause produces the flwg
XML Document:
SQL> SELECT dbms_xmlquery.getXML('select deptno, dname, '||
2 'cursor(select empno, ename, sal from emp e where e.deptno = d.deptno) employees '||
3 'from dept d where d.deptno in (10, 20)')
4 FROM dual;
DBMS_XMLQUERY.GETXML('SELECTDEPTNO,DNAME,'||'CURSOR(SELECTEMPNO,ENAME,SALFROMEMP
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<DEPTNO>20</DEPTNO>
<DNAME>RESEARCH</DNAME>
<EMPLOYEES>
<EMPLOYEES_ROW num="1">
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<SAL>800</SAL>
</EMPLOYEES_ROW>
<EMPLOYEES_ROW num="2">
<EMPNO>7566</EMPNO>
<ENAME>JONES</ENAME>
<SAL>2975</SAL>
</EMPLOYEES_ROW>
</EMPLOYEES>
</ROW>
Is there a way to delete unwanted tag like
<Employees_Row num 1>......<.10>
Some one at this forum suggested to used XMLELEMENT(), XMLAGG() and XMLFOREST().Any ideas of how to use these,
I am presently using the
DBMS_XMLQuery.setRowTag(queryCtx,NULL);
but its not helpful when you have a long and nested XML
Any ideas please?

Hi,
Thanks for yr prompt response.
This is the XML document:
<?xml version = '1.0'?>
<SDIEXTRACT>
   <SDIOWNER>OURS</SDIOWNER>
   <ACTIVE_FLAG>Y</ACTIVE_FLAG>
   <CAPACITY_IND>P</CAPACITY_IND>
   <CMPY_CODE>8</CMPY_CODE>
   <CMPY_XCOD_CODE>CEDL</CMPY_XCOD_CODE>
   <CPTY_BORG_CODE>
      <CPTY_BORG_CODE_ROW num="1">
         <BORG_NUM>8</BORG_NUM>
         <XCOD_CODE>CEDL</XCOD_CODE>
      </CPTY_BORG_CODE_ROW>
   </CPTY_BORG_CODE>
   <EVNT_TYPE>TRD</EVNT_TYPE>
   <INST_NUM>10404</INST_NUM>
   <INST_XCOD_CODE>USER</INST_XCOD_CODE>
   <LAST_CHG_DATE>11/5/2001 17:31:41</LAST_CHG_DATE>
   <MRKT_XCOD_CODE>CEDL</MRKT_XCOD_CODE>
   <RLBG_XCOD_CODE>CEDL</RLBG_XCOD_CODE>
   <RSON_CODE>NOR</RSON_CODE>
   <SETT_RISK_CODE>A</SETT_RISK_CODE>
   <STUS_IND>INV</STUS_IND>
   <USERNAME>MJONES</USERNAME>
   <VERS_NUM>6</VERS_NUM>
   <DEPO_NOSTRO_IND>
      <DEPO_NOSTRO_IND_ROW num="1">
         <DEPO_NOSTRO_IND>D</DEPO_NOSTRO_IND>
         <ACNT>LIFFE-01</ACNT>
         <SAFE_ACNT_IND>N</SAFE_ACNT_IND>
         <BORG_XCOD_CODE>CEDL</BORG_XCOD_CODE>
         <LAST_CHG_DATE>8/16/1995 16:1:2</LAST_CHG_DATE>
         <NETG_AGREEMENT_FLAG>Y</NETG_AGREEMENT_FLAG>
         <SAFE_ACNT_IND>N</SAFE_ACNT_IND>
         <SDI_NUM>1329</SDI_NUM>
         <USERNAME>PPYPER</USERNAME>
         <VERS_NUM>6</VERS_NUM>
      </DEPO_NOSTRO_IND_ROW>
      <DEPO_NOSTRO_IND_ROW num="2">
         <DEPO_NOSTRO_IND>N</DEPO_NOSTRO_IND>
         <ACNT>LIFFE-01</ACNT>
         <SAFE_ACNT_IND>N</SAFE_ACNT_IND>
         <BORG_XCOD_CODE>CEDL</BORG_XCOD_CODE>
         <LAST_CHG_DATE>8/16/1995 16:1:25</LAST_CHG_DATE>
         <NETG_AGREEMENT_FLAG>Y</NETG_AGREEMENT_FLAG>
         <SAFE_ACNT_IND>N</SAFE_ACNT_IND>
         <SDI_NUM>1329</SDI_NUM>
         <USERNAME>PPYPER</USERNAME>
         <VERS_NUM>6</VERS_NUM>
      </DEPO_NOSTRO_IND_ROW>
   </DEPO_NOSTRO_IND>
   <SDIPARTY>
      <SDIPARTY_ROW num="1">
         <BFUN_CODE>DEP</BFUN_CODE>
         <PARTY_ROLE_CODE>CLR</PARTY_ROLE_CODE>
         <ACNT>LIFFE-01</ACNT>
         <XCOD_CODE/>
      </SDIPARTY_ROW>
      <SDIPARTY_ROW num="2">
         <BFUN_CODE>DEP</BFUN_CODE>
         <PARTY_ROLE_CODE>BOS</PARTY_ROLE_CODE>
         <XCOD_CODE/>
      </SDIPARTY_ROW>
      <SDIPARTY_ROW num="3">
         <BFUN_CODE>NOS</BFUN_CODE>
         <PARTY_ROLE_CODE>CLR</PARTY_ROLE_CODE>
         <ACNT>LIFFE-01</ACNT>
         <XCOD_CODE/>
      </SDIPARTY_ROW>
      <SDIPARTY_ROW num="4">
         <BFUN_CODE>NOS</BFUN_CODE>
         <PARTY_ROLE_CODE>BOS</PARTY_ROLE_CODE>
         <XCOD_CODE/>
      </SDIPARTY_ROW>
   </SDIPARTY>
   <SDIADDR/>
   <BORG_ADDR>
      <BORG_ADDR_ROW num="1">
         <CONTACT>Teifion Thomas</CONTACT>
         <ADDR_1>Typical RIMS plc</ADDR_1>
         <ADDR_2>27 The Turnmill, 63 Clerkenwell Rd</ADDR_2>
         <ADDR_3>LONDON EC1M 5NP U.K.</ADDR_3>
         <FAX>071 251 0915</FAX>
         <SWFT_ADDR>CC3333333333</SWFT_ADDR>
      </BORG_ADDR_ROW>
   </BORG_ADDR>
</SDIEXTRACT>You see the DEPO_NOSTRO_IND_ROW_num =1
and the numbered Inner tags.
These are the ones I'd like to clear.
Any suggestions please

Similar Messages

  • Generating XML Tags in PLSQL using XMLELEMENT

    Hi All,
    I am trying to generate XML Tags using XMLELEMENT. Does anyone has an example for this. I have special characters in my DATA so the normal Concatenation does not work.........
    Thanks In Advance.

    try select xmlelement("ELEMENT_NAME",column)
    into var
    from dual;
    var must be defined as xmltype

  • 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

  • How to remove tag using filter

    I want to use a filter to remove tags already on emails. I can add tags using a filter but cannot see how to remove tag using filter.

    The FiltaQuilla add-on provides a "remove tag" option.
    https://addons.mozilla.org/en-US/thunderbird/addon/filtaquilla/
    http://www.ramsden.org.uk/3_How_to_install_Add-ons_in_Thunderbird.html
    But, out of interest, what's the use case for removing tags by filter? Tags are normally used to facilitate or prompt human intervention and I don't immediately see the value of clearing a tag in a filter. Why tag if a filter will be dealing with it anyway?

  • Lost i photo whilst I was clearing unwanted files

    lost i photo whilst I was clearing unwanted files

    Or, put another way, you deleted iPhoto by mistake?
    Reinstall it.
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2. Download it from the App Store to reinstall It's on your Purchases List* there.
    For older versions that have been installed from Disk you'll need these additional steps:
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 or later they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    *Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • JSP/Servlets functions: clear HTML tags, clear SQL code, validate E-mail

    Hello!
    I am looking for java functions, which:
    - clear HTML tags
    - clear SQL injection code
    - validate an e-mail address
    Probably there are java build-in functions for doing that.
    Maybe anyone could give me their names?
    I would be also grateful for any help, links or something.

    Hi,
    You could try using ,
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    instead of
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    -Amol

  • How to convert a open item become cleared item without using F-32

    Dear experts,
    Can I convert an open item become clear item without using F-32.
    Please help.

    Hi,
    You can use F-28.
    If it's useful assign points
    Thanks&Regards,
    Kumar

  • Is it possible to find the meta tags used in a different website?

    I have a potential client that wants to know the meta tags used in a different site from his own. Is that possible?

    View page source in browser.  FYI: Major search engines don't pay attention to Meta keywords.  So I don't think there's much to be gained from this.  What matters most is the actual page content.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Create XML element without closing tag using Visual C++

    I know how to create xml element with closing tag (using WriteStartElement and WriteEndElement methods)
    <tag id="1234">
    </tag>
    but is there a way in Visual C++ to produce xml element like this
    <tag id="1234"/>
    i.e. without closing tag?

    Hi adamay,
    Please refer to this thread.
    http://stackoverflow.com/questions/8182245/create-xml-element-without-closing-tag-using-xslt
    I think you could try the way of write your own class derived from XmlWriter.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Clear a field using RMDATIND

    Hi,
    I'm using Direct Input to create/change material.
    I'm using nodata field to let unmodify the fileds that I don't want change.
    If I try to clear a field using ' ' the rmadatind program lets the filed unmodify (as for nodata).
    Any suggests?

    Make sure that the field TCODE on structure BMM00 has the value MM02 for changes. I just tried it and it works.

  • EXIF tag used as 'Description'

    What EXIF tag does iPhoto 09 use as description when I import JPGs? With iPhoto 08 it worked when I set the 'Object Name' before importing but since I upgraded to 09 that does no longer work
    I can still see the description for photos I imported when I still had 08, all that I imported with 09 have no description set.
    Any ideas?

    Added the tags using exiftool, below are all the tags set on my test.jpg file:
    ExifTool Version Number : 7.44
    File Name : test.jpg
    Directory : .
    File Size : 382 kB
    File Modification Date/Time : 2009:02:19 19:48:14-08:00
    File Type : JPEG
    MIME Type : image/jpeg
    JFIF Version : 1.01
    Coded Character Set : UTF8
    Application Record Version : 2
    Object Name : Flagpole on the Coney Island beach
    Country-Primary Location Name : United States
    Province-State : New York
    City : Brooklyn
    Caption-Abstract : Flagpole on the Coney Island beach
    Profile CMM Type : Lino
    Profile Version : 2.1.0
    Profile Class : Display Device Profile
    Color Space Data : RGB
    Profile Connection Space : XYZ
    Profile Date Time : 1998:02:09 06:49:00
    Profile File Signature : acsp
    Primary Platform : Microsoft Corporation
    CMM Flags : Not Embedded, Independent
    Device Manufacturer : IEC
    Device Model : sRGB
    Device Attributes : Reflective, Glossy, Positive, Color
    Rendering Intent : Media-Relative Colorimetric
    Connection Space Illuminant : 0.9642 1 0.82491
    Profile Creator : HP
    Profile ID : 0
    Profile Copyright : Copyright (c) 1998 Hewlett-Packard Company
    Profile Description : sRGB IEC61966-2.1
    Media White Point : 0.95045 1 1.08905
    Media Black Point : 0 0 0
    Red Matrix Column : 0.43607 0.22249 0.01392
    Green Matrix Column : 0.38515 0.71687 0.09708
    Blue Matrix Column : 0.14307 0.06061 0.7141
    Device Mfg Desc : IEC http://www.iec.ch
    Device Model Desc : IEC 61966-2.1 Default RGB colour space - sRGB
    Viewing Cond Desc : Reference Viewing Condition in IEC61966-2.1
    Viewing Cond Illuminant : 19.6445 20.3718 16.8089
    Viewing Cond Surround : 3.92889 4.07439 3.36179
    Viewing Cond Illuminant Type : D50
    Luminance : 76.03647 80 87.12462
    Measurement Observer : CIE 1931
    Measurement Backing : 0 0 0
    Measurement Geometry : Unknown (0)
    Measurement Flare : 0.999%
    Measurement Illuminant : D65
    Technology : Cathode Ray Tube Display
    Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
    Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
    Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
    Exif Byte Order : Big-endian (Motorola, MM)
    Photometric Interpretation : BlackIsZero
    Image Description : OLYMPUS DIGITAL CAMERA
    Make : OLYMPUS IMAGING CORP.
    Camera Model Name : E-510
    Orientation : Horizontal (normal)
    X Resolution : 72
    Y Resolution : 72
    Resolution Unit : inches
    Software : Version 1.3
    Modify Date : 2008:10:18 13:00:33
    Exposure Time : 1/250
    F Number : 10.0
    Exposure Program : Creative (Slow speed)
    ISO : 100
    Exif Version : 0221
    Date/Time Original : 2008:10:18 13:00:33
    Create Date : 2008:10:18 13:00:33
    Exposure Compensation : 0
    Max Aperture Value : 3.5
    Metering Mode : Multi-segment
    Light Source : Unknown
    Flash : Auto, Did not fire
    Focal Length : 17.0 mm
    Flashpix Version : 0100
    Color Space : sRGB
    Exif Image Width : 2243
    Exif Image Height : 2995
    Custom Rendered : Normal
    Exposure Mode : Auto
    White Balance : Auto
    Digital Zoom Ratio : 1
    Scene Capture Type : Standard
    Gain Control : None
    Contrast : Normal
    Saturation : Normal
    Sharpness : Normal
    GPS Version ID : 2.2.0.0
    GPS Latitude Ref : North
    GPS Longitude Ref : West
    GPS Altitude Ref : Above Sea Level
    GPS Time Stamp : 17:00:35
    GPS Map Datum : WGS-84
    Image Width : 2243
    Image Height : 2995
    Encoding Process : Baseline DCT, Huffman coding
    Bits Per Sample : 8
    Color Components : 3
    Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
    Aperture : 10.0
    GPS Altitude : 5 m Above Sea Level
    GPS Latitude : 40 deg 34' 22.20" N
    GPS Longitude : 73 deg 58' 50.40" W
    GPS Position : 40 deg 34' 22.20" N, 73 deg 58' 50.40" W
    Image Size : 2243x2995
    Shutter Speed : 1/250
    Focal Length : 17.0 mm
    Light Value : 14.6
    Preview recognizes the tag correctly, only iPhoto does no longer do.
    What are your import settings? Do you copy items into the iPhoto library?

  • Reading jsp  tag using xml

    Hello friends,
    I have a problem.
    I have a jsp page in that i have to find a particular tags. using xml
    but i dont know about dtd and. please help me
    example.
    <input type ="text" value= "ss">
    now i want to find the above tag using xml
    so please give me the logic how to find a tag in jsp using xml. ?
    please help me.

    A JSP is for displaying data. Read after me:D-I-S-P-L-A-Y-I-N-G. It has no business parsing or
    reading or calculating anything.
    I don't know what the OP want's to do. Maybe he
    want's to write a application which replaces some
    html tags in JSP files.
    His post can also be interpreted that he want's to
    use JavaScript (DOM)) to find any particular tag.Hello,
    my problem is in our application some programmers have written hardcode in <intput tag> like <input type name ="hardcode" instead taking values from database dictonary.
    so now i have to find the line no. where they have written the hard code.
    for that my pl is asked to solve using dom.
    for that i need to find the html tags.
    but i m not able to do that.
    can u suggest me.
    Regards

  • Clearing the screen using java

    hi
    how to clear the screen using a java program

    for (int n = 0; n < 24; n++) System.out.println();
    Even better: don't clear the screen. The program I ran before your program printed out very important things. If your program throws away those important things then I will not like you or your program.

  • Building JSF tag using existing Tags

    Hi all
    I wonder if it's possible to create a new JSF tag using existing JSF Tags?
    For example, I have a JSF tag which renders a lable and a textinputfield, let's call it <f:field>
    Now I want to build a new JSF tag, which will re-use the existing tag <f:field>. IS it possible?
    Thanks in advance

    Did you have a chance to look at facelets solution. Facelets provide several approach how to create composition components.
    Sergey : https://ajax4jsf.dev.java.net

  • Overwriting the value of an html:hidden tag using javascript

    Hi!
    Can somebody help me with my problem?
    I need to overwrite the value of my html:hidden tag using javascript, but I dont know how?
    Any help?
    Thanks

    what are you talking about :x
    thats a webapplication question, wrong forum..
    But you are using STRUTS I would say...
    <html:hidden property="hiddenfield"/>This is the proper way of doing it.. but overrighting it
    I don't think you understand why we use that?
    It is only for forms.... we use that for hidden input ... It is common sence not to overrde that value.

Maybe you are looking for