How can I convert text to XML format in plain text?

Oracle 11 g 2: 11.2.0.4.0

I have data that is parsed from XML and saved in a table as a field of type VARCHAR.

The text is formatted as follows:

<span style="font-family:'Times New Roman','serif'; font-size:12pt">24 PC'S "6 x 4up arrays" =  MAX FOR MIN QTY AT INDICATED LOT CHARGE </span><br> Material currently in stock


I need to remove the formatting and convert the text to this:

24 PC'S 6 x 4up arrays MAX FOR MIN QTY AT INDICATED LOT CHARGE Material currently in stock


Is there an existing function in SQL or PL/SQL that will decode the formatting?

Thank you

-Johnnie

This text is a string of HTML to the doubling actually escape sequence, because it contains a
tag.

Therefore, you must:

-unescape any coded entities twice

-replace the
tag with a character LF - optional step depends on how you want to manage

-remove all tags (using a regular expression)

-eliminate the remaining entities

This query will do:

SQL> select utl_i18n.unescape_reference(
  2          regexp_replace(
  3            replace(
  4              dbms_xmlgen.convert(dbms_xmlgen.convert(str, 1), 1)
  5            , '
' 6 , chr(10) 7 ) 8 , '<[^>]+>' 9 ) 10 ) 11 from sample_data ; UTL_I18N.UNESCAPE_REFERENCE(RE -------------------------------------------------------------------------------- 24 PC'S "6 x 4up arrays" = MAX FOR MIN QTY AT INDICATED LOT CHARGE Material currently in stock

Tags: Database

Similar Questions

  • How can I convert JPEG to DOC format?

    How can I convert JPEG to DOC format?

    I scanned the documents that I want it in .doc format. !

    Hi Shalini,

    One possible solution is to convert jpeg to pdf and export this pdf in .doc format.

    You can buy the pack Acrobat PDF membership: https://acrobat.adobe.com/us/en/products/pdf-pack-pricing.html

    and use the web interface for hassle-free conversion: http://cloud.acrobat.com/

    Kind regards

    Rahul Tyagi

  • How can I convert string to xml in CEP

    I made a simple CEP process that reads from a queue. The CEP has the following components:
    1 input adapter named MktEvtInputadapter.
    2 channel MktEvntInchannel
    3. a MktEvntProcessorprocessor processor.
    4. a MktEvntOutChannel output.
    5. a MarketEventBean bean.

    code for MarketEvent.java:
    package com.bea.wlevs.example.algotrading.event;

    public class MarketEvent {}

    Private Sub Long;
    symbol of the private channel;
    price Double private;
    volume of Long private;
    private Long latencyTimestamp;
    private string text;

    /**
    * @return the latencyTimestamp
    */
    {} public Long getLatencyTimestamp()
    Return latencyTimestamp;
    }
    /**
    @param latencyTimestamp the latencyTimestamp to
    */
    {} public void setLatencyTimestamp (Long latencyTimestamp)
    this.latencyTimestamp = latencyTimestamp;
    }
    /**
    * the timestamp @return
    */
    {} public Long geteventTimeStamp()
    return Sub;
    }
    /**
    @param timestamp the timestamp to set
    */
    {} public void seteventTimeStamp (Long Sub)
    this.eventTimeStamp = Sub;
    }
    /**
    * @return the symbol
    */
    public String getSymbol() {}
    return the symbol;
    }
    /**
    @param symbol the symbol to define
    */
    {} public void setSymbol (symbol of the chain)
    This.Symbol = symbol;
    }
    /**
    * @return the price
    */
    {} public Double getPrice()
    return of the price;
    }
    /**
    @param price TBD
    */
    {} public void setPrice (Double rate)
    This.Price = price;
    }
    /**
    * @return the volume
    */
    {} public Long getVolume()
    return of volume;
    }
    /**
    @param volume the volume to set
    */
    {} public void setVolume (Long volume)
    This.volume = volume;
    }
    public void setString_1 (String text) {}
    This.Text = text;
    TODO self-generating method stub

    }
    public String getString_1() {}
    TODO self-generating method stub
    return (text);
    }

    }

    Code for MarketEventBean:
    package com.bea.wlevs.example.algotrading;

    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.example.algotrading.event.MarketEvent;


    / public class MarketEventBean implements StreamSink {}
    {} public void onInsertEvent (event object)
    If (event instanceof MarketEvent) {}
    MarketEvent marketEvent = (MarketEvent) event;

    System.out.println ("msg:" + marketEvent.getString_1 ());
    }
    }

    }

    I put an xml doc in my queue for entry:
    <? XML version = "1.0" encoding = "UTF-8"? >
    < MarketEvent >
    < sub > 201100501 < / sub >
    < symbol > ABCD < / symbol >
    < price > 258474.56 < / price >
    < volume > 4657892 < / volume >
    < latencyTimestamp > 201100501 < / latencyTimestamp >
    < / MarketEvent >

    My class MarketEventBean will print the msg as string. Now, I have to convert it to xml format to get the value of individual items.
    How can I do?

    I think you need to do this:

    Events.Add (obj);

    in this way, you add the event unmarshaled flow rather than just a string of text

  • How can I convert a photo in format PDF to Excel?

    How can I convert an image (presentation of the floor plan) in Excel?

    You will need to perform recognition (OCR) text during the conversion process.

    Please confirm if you are using the service ExportPDF or Acrobat.

  • How can I convert html5 animated swf format

    I made a banner with animated html5 and now I need to save it in a swf. Is it possible to convert it?

    Thank you

    Go to the commands menu, then choose convert other Formats documents. Here you can convert an AS3 in Florida. It will be saved with a different name, it does not overwrite your HTML5 Canvas in Florida once you have the AS3 FLA, you can publish the animation as a swf file.

  • How can I convert a page typed into an editable text file

    How can I convert a page typed in an edible text file? I have a 50 page typed (on a typewriter ;-) document I want to convert (scan?) in a format so that I can then open the file in a text editing application (Word?) and edit.

    How is the most effective (and least expensive) way to do it?

    Thank you

    HAL

    < re-titled by host >

    "Edible text file?" You hear as he print on rice paper, so you can serve it up like at dinner side dish? You want someone to eat their words

    I think that the last two multifunction printers, I bought came with some kind of OCR characters (OCR) software as part of the sweeping package.  I guess that's not the greatest.

  • How can I convert video content of film in DVD - VR format on a DVD-R

    DVD-video format

    How can I convert video content of film in DVD - VR format on the DVD-R disc in DVD-video format on the DVD-R disc?

    I need to know the software (s) to perform this conversion. My computer's DVD player (R/RW). TX.

    Google found the following software... maybe only he
    worth to try.

    They offer a fully-functional trial version for 30 days:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Extractor from DVD - VR
    http://www.MedioStream.com/products/index_dvdvrextractor.html

    If you try it... Let us know the resukt.

  • How can I convert an email outlook with an attachment in pdf format

    How can I convert an email outlook with an attachment in pdf format? I want a pdf with enamel and fasteners. Not a portfolio

    Hello

    Please go to the Adobe PDF option in the Outlook Ribbon. Choose Change Conversion settings and uncheck "output Adobe PDF portfolio when creating a new PDF file" to create a normal PDF. Attached snapshot.

    Kind regards

    Basma

  • How can I convert .ai files in jpeg format?  It seems that I am only able to get the .ai files and my Adobe Photo Elements program does not recognize the file.

    How can I convert .ai files in jpeg format?  It seems that I am only able to get the .ai files and my Adobe Photo Elements program does not recognize the file.

    I want to continue my membership with Adobe, however, not if it requires some additional software purchase.

    For .ai files, you will need to use or know someone who uses Illustrator or another program compatible .ai to convert. If you access a page of image details before license you can see the file type.

  • How can I convert my view files in pdf format

    How can I convert my view files in pdf format

    Not with Adobe/Acrobat Reader.  You have Acrobat Professional or Standard?

  • I need to convert PDF into Word Document, so it can be edited. But grateful text options do not have the language I need. How can I convert the file in the desired direction of my language?

    I need to convert PDF into Word Document, so it can be edited. But grateful text options do not have the language I need. How can I convert the file in the desired direction of my language?

    The Acrobat application provides no ability to language translation.
    If you locate the language for the applications from the OS, MS Office, Acrobat, etc. to the desired language try again.
    Alternative: transfer a copy of the content in a web site based in PTE (Bing or Google offers a free service).
    Transfer the output in a word-processing program that is localized in the appropriate language.
    Perform the cleaning.

    Be well...

  • How can I convert my logo 300 dpi (274 pixels wide) of the EPS to Gif format?

    I have a logo that needs to be fixed for purposes of web. It looks like a lot to print but very poor quality screen. I need one for my Web site and HTML email newsletters, as well as a high quality GIF 300 DPI (274 pixels wide) for a HTML signature code. I tried in Photoshop to save this file in the GIF format. But it seems that my files is 274 pixel but it is 96 DPI instead of 300 dpi. How can I convert an it EPS to GIF 300 dpi (274 pixels wide) file format?

    I have an EPS file for her. Can someone help me please? Here is the LINK

    If your logo is 274 pixel wide at 300 dpi, it will print. 9 "wide.      DPI is meaningless to the web for screens and display drivers do not use the file image dpi setting.  Views are executed at a resolution normally manufactured pixel resolution.   View these days are made with a resolution of 96PPI at 300PPI so your logo appears 2.8 "wide screen resolution low 96ppi and. 9 "wide screen resolution of 300ppi high. The difference between Jpeg and Gif's color supports Jpeg 8 bit so 16 M color but does not support transparency.  GIF only supports 256 mapped colors reduced to 255 colors it you want transparent empty pixels.  You can also use PGN format that supports transparency support and 8 or 16-bit color.

  • How can I convert a Word document in Adobe's PDF format?

    How can I convert a Word document in Adobe's PDF format?

    You can use Adobe Acrobat or Adobe CreatePDF.

  • I can't import my rushes. How can I make my files supported formats? Help, please!

    Hi, I have a big problem and I'm on a deadline! I can't import my footage in Windows Movie Maker. How can I make my files supported formats?

    Convert to a format...

    The. WMV format is the best choice for video files.

    There are to many converters available on the net...
    the following links are some examples. You can
    need to experiment to find the best result.

    Proceed at your own risk *.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (1) format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup270.zip<>
    (FWIW... installation..., you can uncheck
    'all' boxes on the last screen... even in this case, it may
    install the Ask toolbar on your system)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag FFSetup270.exe out of the folder
    and drop it on your desktop. To install left click.

    (2) Freemake Free Video Converter (freeware)
    http://www.Freemake.com/free_video_converter/
    (Windows XP / Vista / 7)

    (3) Koyotesoft Free Video Converter
    http://www.koyotesoft.com/indexEn.html
    (2000/XP/2003/Vista/Seven)

    (4) Sothink Free Video Converter
    http://www.Sothinkmedia.com/video-converter/
    (Windows XP / Vista / 7)

    (5) hamster Free Video Converter
    http://www.PCWorld.com/downloads/file/FID, order 155794, 4 pages, 1/download.html
    (Windows XP, Vista, 7)
    (If you choose Custom Installation
    You can uncheck additional modules you
    do not want to install)

    (6) quick Media Converter
    http://www.Cocoonsoftware.com/
    (Win XP, Vista, Win 7 Home Premium)

    (7) SUPER © Simplified Universal Player Encoder & Renderer
    http://www.videohelp.com/tools/Super
    (the download mirror site is faster) (Windows XP / Vista / 7)

    (8) Xilisoft Video Converter
    http://www.Xilisoft.com/video-converter.html
    (not freeware but receives good reviews)
    (Windows XP (SP2 or later) / Vista / 7)

  • How can I convert ASF files to JPEG

    I have a camcorder DV2500 - small and cheap, but it works.  The pix, that I used to take and put on my computer had jpeg for an extension. all of a sudden was last year the extension ASF when I saved it on my computer and other computers can not open the ASF files. How can I convert ASF JPEG?

    Whoa... now say you they are video files? That's what I
    suspicious, and of course change to JPEG will not work...
    So what happened to the idea that it was JPEG image
    files? Maybe I just misunderstood your original question.

    If you need to convert ASF files to another
    format of... WMV would be a good choice.

    The following information may be useful:

    There are many converters available on the net... some
    free... some detail.

    The following freeware converters are a few examples:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (1) Sothink Free Video Converter
    http://www.Sothinkmedia.com/video-converter/
    (Windows XP / Vista / 7)

    You will need to unzip the file... or you could just drag
    the Setup.exe from the file out of the folder and drop it on your
    desktop and install from there.

    Once installed... Open Sothink and go to... Add the files button...
    Find and select the clips you want to convert.

    Next... in the encoding settings... Choose... Video credits.
    WMV - Windows Media Video (*.wmv).

    Choose an output folder and on the left, click on the button convert.

    You can experiment with other settings later but
    This should help you get started.

    (2) format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup270.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the last screen)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag FFSetup270.exe out of the folder
    and drop it on your desktop. To install left click.

    Next, after the download and installation of Format
    Factory... you can open the program and
    left click on the toolbar, the "Option" button and
    "Select an output folder to" / apply / OK.
    (this is where you find your files after they)
    are converted)

    Drag and drop your video clips on the main screen...

    Select "all to WMV" / OK...

    Click on... Beginning... in the toolbar...

    That should do it...

    Good luck...

Maybe you are looking for