How to remove control chars from clob, prior to creating xmltype

Hi,
I am struggling with what should be really straightforward ...
I have a simple program that takes an xml file stored in a clob column and attempts to convert it into an xml type.
The program is
declare
     v_xml xmltype;
     v_jobs_clob clob := empty_clob();
begin
     dbms_lob.createtemporary(v_jobs_clob,true);
     select clob_tmp into v_jobs_clob from clob_tmp where rownum < 2;
     v_xml := XMLTYPE.createxml(v_jobs_clob);
end;
However my clob clearly contains at least one invalid character as I get this
declare
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00217: invalid character 7 (U+0007)
Error at line 450
ORA-06512: at "SYS.XMLTYPE", line 5
ORA-06512: at line 8
What I would like to do is to strip all the control characters from the v_jobs_clob before calling createXML.
I have tried all sorts of things, like replace etc, but to no avail.
Please help...
Ralph

I would have suggested that too but the [:cntrl:] character class also includes XML-valid characters such as #x9, #xA and #xD :
SQL> select level as "AsciiCode"
  2       , chr(level) as "ControlChar"
  3  from dual
  4  where regexp_like(chr(level), '[[:cntrl:]]')
  5  connect by level < 256;
AsciiCode Cont
         1 ☺
         2 ☻
         3 ♥
         4 ♦
         5 ♣
         6 ♠
         7
         8
         9
        10
        11 ♂
        12 ♀
        13
        14 ♫
        15 ☼
        16 ►
        17 ◄
        18 ↕
        19 ‼
        20 ¶
        21 §
        22 ▬
        23 ↨
        24 ↑
        25 ↓
        26 →
        27 ←
        28 ∟
        29 ↔
        30 ▲
        31 ▼
       127 ⌂
32 rows selected.

Similar Messages

  • How to remove the Char.from one Operating Concern

    Hi Guys,
    How to remove the Char. from one Operating Concern.
    I have created one Char. (WWDOC) and moved to Operating Concern (OOCC). Operating Concern is in red status.
    Now, i want to remove that new assigned Char. (WWDOC)from the operating concern (OOCC). I did't find any option in the menu also.
    Appreciate your help.....
    T&R
    VVR

    Hi Sasi,
    Iam not able to push back that char. from my operating concern. In help it is given you have to delete the data contents in the table before pushing back. Please let me know if any other option available.
    Thanks for your reply.
    VVR

  • How to remove empty char from a string

    Hi,
    In my code I should get numeric int numbers and convert them to 1 and 0 , concatenate thm to make an string ( 8 chars) . the problem I have is the empty chars as result of conversion from number to string
    so lets say pxiAnaIn=1 dutVdd=2 and dutOut=5 so then the output should be 10110001 but now the output is 10110  1 . could you please let me know how can I fix this problem
    thanks

    tintin_99 wrote:
    Hi,
    In my code I should get numeric int numbers and convert them to 1 and 0 , concatenate thm to make an string ( 8 chars) . the problem I have is the empty chars as result of conversion from number to string
    so lets say pxiAnaIn=1 dutVdd=2 and dutOut=5 so then the output should be 10110001 but now the output is 10110  1 . could you please let me know how can I fix this problem
    thanks
    You could make your life a little easier and only use 1 format string.  Use "%03b%02b%03b" for the format string.  You can then expand the format string to allow multiple inputs.  You will do the job of 4 functions with just 1.
    "%3b" just says to give 3 spaces for the binary number.  But any preceding 0s will be turned into spaces.  Adding the 0 in there tells the format string to prepend 0s instead of using spaces.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to remove Mozilla Thunderbird from Mac Pro 10.9.3

    Good evening everyone. I am new to Apple and the Mac enviroment coming over from Windows
    I installed Mozilla Thunderbird and am not sure how to remove it completely from my system.
    Can someone please let me know step by step what I need to do to remove Mozilla Thunderbird from my Mac as I don't like it's UX and will most likly never use it.
    Thank you.

    To make sure, click Finder on your Dock.
    Then click on Applications and scroll down looking for the Thunderbird App.
    If you find it there, do a control click "Move to Trash" or click hold and drag it to the Trash.
    For more on OS X Finder, see > Mac Basics: The Finder
    For more on OS X in general, see > Mac Basics - Apple Support

  • How to remove credit card from iphone4s

    how to remove credit card from iphone4s

    Not sure what you mean by this. Are you trying to remove your credit card information from the App Store/iTunes store?

  • How to remove available downloads from the list

    how to remove available downloads from the list without it resuming when i open itunes or check for available downloads?

    There is not a way to remove them from the list.  Just let them download, and then delete them from your library when they are done.

  • How to remove "open dns" from imac

    how to remove "open dns" from imac

    Unlock the Network preference pane, if necessary, by clicking the lock icon in the lower left corner and entering your password. Cllck Advanced, open the DNS tab, and delete the server addresses. Click OK and then Apply.

  • How to remove SD Card from the Card Reader slot - Satellite A100?

    Hi,
    Is there anyone to help me? I inserted a 64 MB SD card in the card reader slot of my Toshiba A100 model. It's the first time i have inserted the card. The card is inside the slot. I can not take it out! I don't have any idea how to remove the card from the card reader slot. I can see the contents of my SD card, can open the files too. But how to remove it out from the slot. Please help me giving your idea to remove the card out from the slot.
    Arjun

    Hi
    In my knowledge the SD card slot doesnt has a any additional helps like the PCMCIA slot to remove the card.
    You have to remove it simply. Try to grab the card and move it out. You can try to use the pair of tweezers. Maybe it helps

  • How to remove sd card from iMac

    hi how to remove sd card from imac ,thanks

    If your machine is in warranty, be careful not to do anything more that might damage it when removing it from the optical drive.  You might even be able to convince an authorized service technician to carefully remove it under warranty from the optical drive.  It is a design issue that lets people accidentally insert the SD card in the optical drive.   Of course if that's the only copy of your information on the SD card, be sure to let them know that, so they are extra careful not to damage it when removing it.

  • How to remove an ipad from my account

    I am given my first ipad away, how i remove this ipad from my account? I already reset all contents.

    See http://support.apple.com/kb/HT5661.

  • How to remove esclamation mark from itunes

    how to remove esclamation mark from itunes???

    See these...
    -> One computer using multiple iTunes Store authorizations
    -> About iTunes Store authorization and deauthorization

  • How to remove an iphone from my id

    hi,
    once my friend sync-ed his iphone with my computer. then whenever he is in wi-fi zone it is asking password for my used id for updating the apps. how to change the user name in his phone or how to remove his device from my apple ID. please help.
    thanks
    karthik

    The only way to fix this is for your friend to delete all the content, on his/her phone, obtained using your ID. Fact is, that's called stealing. There is no other fix.

  • How to remove a node from nlb at runtime?

    hello,
    i need to temporally exclude a node from an nlb.
    May happen that a server is up and working but the web application i'm balancing is out of sinch with the same application in the others nodes.
    Eg. some static variables are not the same of the same static variables of other nodes, because of a timeout, a write error and so on but the server is still working.
    in this case i need to stop the server from nlb because the information in the web application is not in sinch with other nodes.
    I need to prevent users from being serverd from this out to date server, untill it will became updated, but i need to do this programmatically
    how can i do it?

    "DuoMi" <[email protected]> wrote in message
    news:gnojbf$2sg$[email protected]..
    > How to remove a node from XMLList
    >
    > I want remove the first node from XMLList
    >
    >
    > and how to get the combobox all values string:
    >
    > <data>
    > <value>2</value>
    > </date>
    > <data>
    > <value>5</value>
    > </date>
    > <data>
    > <value>8</value>
    > </date>
    >
    > I need a string whit value "2,5,8"
    >
    > thkan you.~
    I think something like
    comboBox.dataProvider..value.toString()
    will work.

  • How to remove the "0" from the sum cell when the other cells are empty?

    Hello!
    When I use the formula to sum the values from a few cells, there is a zero in the sum cell when the other cells are empty.
    My question concerns how to remove the 0 from the sum cell when the cells that will be summed are empty.
    Thank you!
    /Johan Strömbeck

    Hi,
    Please try the Mr. Laurence's suggestion first. Then, we may try the other workarounds.
    1) Go to Excel option> Advanced>Display Option for this worksheet> Uncheck Show a zero in cells that have zero value
    2) Go to Conditional Formatting>New Rule>Format only cells that contain> Value equal to 0> Format the color with white
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support

  • How to remove a package from package structure?

    Hello profs,
    i have a problem. I add a package 'A' to another package 'B' in the package builder.
    Now i don't know how to remove package 'A' from the list of package 'B'.
    I have not found in the docu of package builder how to remove a package from the included list.
    Has somebody an idea how to do it?
    Thanks a lot.

    I found out that the relation between the packages saved in table TDEVC.
    Field PARENTCL contains the surrounding package 'B' of the package 'A' field DEVCLASS.
    At the moment the only way to remove the package is to modify the table.
    But i look for another possibility for this issue.
    Best regards
    Waldemar

Maybe you are looking for

  • I cannot put any of my itunes library on my new iPad

    This is a match/icloud issue.  I bought a new ipad mini for personal use as well as to play music in my fitness classes.  I did not buy a cellular capable ipad and I do not have wifi access at every gym I teach at.  So I need my device to actually ho

  • How to use WebDynpro Applications in Guided Procedure?

    Hello, i want to use a WebDynpro    application as a part of a guided procedure. Therefor i developed a simple WebDynpro    application as described in the NetWeaver    Developer Studio Help. The Application consists of only two views. The first view

  • Just To Be Clear, Filename is the Master file name

    Aperture has a Version Name field and a File Name field. But, no Master Name field. That's because the Master Name is the File Name. Correct?

  • Can I rename *selected* layers with scripting?

    Hello forum, Let me just start off by saying I know NOTHING about Photoshop scripting. But I recently encountered a need to rename a whole stack of layers in a certain file, so I went Googling... I came across this Rename Layers script -- http://morr

  • PdfA1b -  Subject Mismatch between Document Info and XMP metadata

    As far as I can tell, when generating PdfA-1b files I am completely compliant with the spec. Yet when I try to preflight verify my output I get the following error: "Subject mismatch between Document Info and XMP metadata". Here is my Document Info: