Remove the node text spaces

Hello

We are in the process to migrate our 10.2.0.4 db to 11.2.0.3 and discovered a problem with one of our requests - basically, extract us from the text of a node as a number and if this node consists of a space only, he is now back a 0 in 11.2.0.3 rather than the NULL value, it allows to return to 10.2.0.4 (and earlier versions).

Here are examples I've worked with:
select extract(xmltype('<root><test> </test></root>'), '/root/test/text()').getnumberval() from dual;
select extract(xmltype('<root><test>
</test></root>'), '/root/test/text()').getnumberval() from dual;
I raised a SR with Oracle, due to the difference in the behavior of our 10 g database, but in the meantime, I need to work around this problem. If there's an orderly way to remove the whitespace node text? I would rather have to convert the xmltype to a clob to do a replacement, or the extraction of the node as text and then cut and replace and converted to a number, if possible.

Hello

I can reproduce the 'new' behavior on 10.2.0.5 too:

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE    10.2.0.5.0      Production
TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production

SQL> select extract(xmltype('
  2  '), '/root/test/text()').getnumberval() as result
  3  from dual;

    RESULT
----------
         0

On 11.2.0.3, if you can invest time in refactoring, I would say that rather use you no deprecated features:

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

SQL> select xmlcast(
  2           xmlquery('normalize-space(/root/test)'
  3             passing xmltype('
  4   ')
  5             returning content
  6           )
  7           as number
  8         ) as result
  9  from dual ;

    RESULT
----------

SQL> select xmlcast(
  2           xmlquery('normalize-space(/root/test)'
  3             passing xmltype('123')
  4             returning content
  5           )
  6           as number
  7         ) as result
  8  from dual ;

    RESULT
----------
       123

Tags: Database

Similar Questions

  • remove the label text border control

    How to remove the border around the text of a control label?

    Thank you...

    Go to the tools Palette and select paint labels made Transperant once for a single label, you can just click on other labels to make transperant.

  • Remove the hyperlinks text decoration

    Hi, I have difficulty to remove the underline from hyperlink in a text box on a page of destination E10 hosted.  I unchecked the underscore in the submenu tools but this is equivalent to 'True' when I click on suite. Is anyone able to help me achieve this goal through HTML?   The source code, we have at present is:

    " < a title ="Website"href =" http://www.CompanyName.co.UK "> < span style =" color: rgb (80, 184, 72); "> < font style =" do-size: 14px; "" > companyname.co.uk < / police > < / span > < /a >

    Insert the Style = "" text-Decoration: None ' in the link. " This will do the trick.

  • Remove the conditional text

    In my text selected with two conditional text (red and green). I must remvoe the conditional text in red in the selected text

    How to do this

    Try this:

    (function removeConditionalText(/*Text*/tx,/*UIColor*/uiColor,/*bool=false*/STRICT)
    // -------------------------------------
    // Remove any text within tx having a uiColor condition applied.
    // (If STRICT is true, do not affect text undergoing multiple conditions.)
    {
        var ranges = tx.textStyleRanges,
            a = ranges.everyItem().getElements(),
            conds = ranges.everyItem().appliedConditions,
            i = a.length,
            t, c;
    
        while( i-- )
            {
            t = conds[i];
            if( STRICT && t.length != 1 ) continue;
            while( (c=t.pop()) && !(c=c.indicatorColor==uiColor) );
            if( c ) a[i].remove();
            }
    
    })(app.selection[0],UIColors.RED);
    

    @+

    Marc

  • Cannot remove the 3D text effect

    I can't remove the text that I put it 3D.

    If you mean that you converted the text to a 3D extrusion, then it is normal. It is a one-way road. You must retype the text.

    Mylenium

  • Is it possible to remove the yellow text in the whole of the document?

    I have the same problem as the one that is mentioned here:http://forums.adobe.com/message/1155089 in my case the yellow background is already in the pdf file that was created with a printer virtual pdf and then manipulated with another pdf editor.  Accidentally, I noticed that it is possible to remove the background yellow in Acrobat Pro, as if I want to change an object. Get rid of it, on each page by hand would be a daunting task. Is it possible to do somehow with the entire document? Any help would be appreciated.

    see you soon

    BTW: The yellowish background does not appear in the other pdf viewers.

    Looking at the file, it appears that the colored boxes are actually part of the record. You can see if you open the content pane. You will find may be easier to delete in the content pane. They seem to be incorporated into the file when the text is applied. Your PDF creation software has the ability to disable this option?

    Another possibility (suggested to Dave Merchant) is to do the following to remove it from all pages automatically:

    • Convert colors to push the entire document in a single area, such as Swop2
    • All of your yellow boxes are now something about 3.4% yellow (find out with the inspection of a yellow box)
    • Create a new Preflight Check to detect objects with exactly this percentage of yellow plate
    • Create a new correction to move the objects identified by this audit in a new layer, then run
    • Turn the layer off, now you can print the file
  • Remove the node XML with E4X

    How can I do? I tried "Delete node;" or even = null;

    OK, I found a solution to this...

    First, the problem was mainly that I was trying to do this dynamically, without really say the name of the child I want to remove.

    So, if it's only what needed to be done:
    delete xml.hello;
    and the XML looks like

    something

    It would work. But now I tried to remove a node without knowing the name of it.
    but it works when I did like this:

    var node: XML = XML (checkbox.data.node);
    var Noeudparent: XML = node.parent ();
    Remove nodeParent [node.name ()] [node.childIndex ()];

    And it works!

    I don't know if it's the best way, but it works and I am pleased...

  • AS social / SHARE: remove the extra text beside icons?

    Top right: http://AA14.BusinessCatalyst.com/index.html

    can the accompanying text on the number of persons like this page, I let the icons and delete the text.

    Also tried to reduce the icons/buttons to about 80% of actual size, but I have not figured out how.

    BTW, I've been with the MU from the beginning, and many great changes have taken place, even the help on this forum has got to be exceptional. Thanks for all the effort to make a great product.

    Hi Anita

    I checked and you can see the question, but the transparent box appears only if you are already signed into FB same browser.

    This does not occur when you connect separately, click on as a small window to connect. In your site, it seems to fall behind a layer.

    You can make white transparent if you add background-color: white; in the style="" part of the iframe.

    I tried to test this out with the new site and new page, but cannot replicate.

    Would be really nice, if you can provide me with the code that you used or send me the muse file itself.

    Also on another note, have you tried to add the code in the html section in the page to the end of BC?

    Cannot be confirmed without the file, but it seems the problem is more with the generation of code from facebook.

    Thank you

    Sanjit

  • How to remove the 'link text' of an action link

    Hello world

    After searching the forum and the web with no luck, I need help on this topic. I work with many reports pointing to other dashboards. These dashboards have been created in 10 OBIEE and migrated to 11.1.1.3.
    What we wanted to do (and combined in 10g) should be able to click on some data (on a value of a graph, a column value in a header table) and go to an another dashboard. OBIEE 11g for this criteria-> columns-> Interaction Properties tab and selecting the action links.

    11 g, when do this Action of links and clicking on a value, appears a link 'text' (screenshot: [https://picasaweb.google.com/102130000310148493868/Screenshots#5646178057282726354]), so that the user must carry out 2 clicks (the one on the value and the other in the link text).

    Is there a way to delete this text link? It can be a bit boring if there is always an option and unnecessary.

    Thank you

    Hi Elena!

    In the tab Interaction (in the column properties window), once you create the action, you will be just there a checkbox that says: "can't be a popup if only an action link is available during execution. Clik on the box and you're ready to go!

    Please assign points if helful.

    J. -.

  • You need to remove the return trolley, spaces, etc..

    Hello

    I am trying to build a string that is on a single line,

    1,2,3,4,5,6,7,8,9

    However, I end up with each number on a separate line.

    1,

    2,

    3,

    4,

    5,

    6,

    7,

    8,

    9

    My code looks like this:

    var xxx = "";

    for (var i = 1; i < = nNumWords; i ++) {}

    global.srchVals [i] .name = "payer Mix."

    global.srchVals [i] .blog = 0;

    XXX = i;

    If (I < nNumWords) {}

    xxx = xxx + ",";

    xxx = xxx.replace ("/ \s + / g," "") .trim ();

    } else {}

    xxx = xxx;

    xxx = xxx.replace ("/ \s + / g," "") .trim ();

    }

    var PMItms = [xxx];

    Console.println (xxx);

    }

    I tried to use the following line of code to remove spaces and carriage returns:

    xxx = xxx.replace ("/ \s + / g," "") .trim ();

    But it keeps giving me the following error message:

    TypeError: xxx.replace(/\s+/g, "") .trim is not a function

    Any help is appreciated.

    Thank you

    Linda

    You are right.  It is a false problem.  I solve the problem this way:

    var PMAddItms = "";
    var PMLstItms = "";
    for (var i = 1; i)<= nnumwords;="" i++)="">
    global.srchVals [i] .name = "payer Mix."
    global.srchVals [i] .blog = 0;

    PMAddItms = i;
     
    If (i< nnumwords)="">
    PMLstItms = PMLstItms + PMAddItms + ",";
    } else {}
    PMLstItms = PMLstItms + PMAddItms;
    }

     
    }
    var PMItms = [PMLstItms];

    Now I get one line of numbers.

    1,2,3,4,5,6,7,8,9

    Thanks for your help.

    Linda

  • remove the selection text box in the text block related

    I chose text frames linked text frame

    out of the text and I want to delete a block of text

    Is it possible that an order letter

    B1.jpg

    same thing by selecting the external box

    B2.jpg

    Ok. Try now,

    var doc = app.activeDocument;
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "~a";
    var found = app.selection[0].findGrep();
    for(var i =found.length-1;i>=0;i--)
    {
            var ip = found[i].insertionPoints[0];
            if(found[i].allPageItems[0] instanceof TextFrame)
            {
                    var cont = found[i].allPageItems[0].texts[0].duplicate(LocationOptions.AFTER,ip);
                    found[i].remove();
                }
        }
    

    Kind regards

    Cognet

  • Cannot remove the stray text

    I'm normally a coder and and encode everything on dreamweaver. However, I have a friend who needed a compact project and fast so I thought I'd try Muse. It became a disaster. If I knew how to get the code, this is the html code, I could fix it in 1 minute. But, I can't. It will not cut or delete, it will not clear the page somehow. Does anyone have a possible solution? I am in a real bind. I've never heard of such a thing. Thank you. The inability to remove in the Muse. I worked with before Muse and had no such problem. Puzzled.

    Post edited by: don gallucci

    Hello

    Some think to check:

    • the text you are trying to modify is on a master page while you're on a standard page
    • the text block is locked. Try the object > unlock all on the page menu

    Abhishek

  • Try to remove the mass text anchors

    Hi all

    At my work we clean up files created by various clients. For a customer (and one...) all the files we receive from them are filled with what looks like anchor text when we turn "Show hidden characters". They cannot be hilighted and sometimes it can be anywhere from 2 to 6 of them in a row.

    If we do not remove them, it causes problems for the next stage of our process and their manual removal may take a long time. Does anyone know a quick way to find/delete these?

    We mainly use the InDesign CC, but we also tried this on Id CS5 and CS6 CS5.5.

    Here is an example of what we see in this case. I couldn't recreate the issue, I simply copy/paste and re-typed round her.

    Testing.jpg

    Try a TEXT search for which is the code for a merge field marker, don't get to the misidentified as ~ I in the GREP find if you paste one in.

  • How to remove the copyright text

    Hello

    I wan to delete the text of author (* Copyright (c) 2006, Oracle.) All rights reserved.*) from the page of the OFA.
    How to do this?
    Any help would be much appreciated...

    Thank you...

    See Note: 602391.1 - how to remove or hide Oracle Copyright footer information?
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=602391.1

  • remove the node xml with DELETEXML

    Hi all,

    I need a little help. I'm trying to delete a node by using DELETEXML, but my script does not work. It run correctly, but it returns the same xml file.

    This is my script:

    Set serveroutput on

    set linesize 1000

    set verify off

    DECLARE

    l_xmlType XMLTYPE.

    BEGIN

    dbms_output. Enable (500000);

    l_xmltype: = XMLTYPE.createXML ("< ns0:msg xmlns:ns0 ="http://namespace"> ")

    < ns0:Intestazione >

    < ns0:Operazione >

    < ns0:Tipo > DE9GM < / ns0:Tipo >

    < ns0:Ticket > 1031450000607 - 001 - 20131023021515 < / ns0:Ticket >

    < ns0: Data > 2013 - 09 - 30 < / ns0: Data >

    < / ns0:Operazione >

    < / ns0:Intestazione >

                                    </ns0:msg>'); -CREATION of XML

    dbms_output.put_line('ORIGINAL file:'|| l_xmltype.) GETSTRINGVAL);

    SELECT DELETEXML (l_xmltype, ' / ns0:msg / ns0:intestazione ',' xmlns:ns0 = "http://namespace")

    IN l_xmltype

    DOUBLE;

    dbms_output.put_line('OUTPUT file:'|| l_xmltype.) GETSTRINGVAL);

    END;

    That's what I would like to have:

    " < = xmlns:ns0 ns0:msg ' http://namespace ">

    < ns0:Intestazione >

    < / ns0:Intestazione >

    < / ns0:msg >


    But I have the same original xml.

    I'm using Oracle Database 11 g Enterprise Edition 11.2.0.3.0

    Ciao,.

    the XPATH expression is invalid, because it is all lowercase, but it is case sensitive.

    Also the XPATH expression was not correct (missing "ns0:Operazione").

    Try this:

    DELETEXML (l_xmltype, ' / ns0:msg / ns0:Intestazione / ns0:Operazione ',' xmlns:ns0 = "http://namespace")

    Kind regards.

    Alberto

Maybe you are looking for