PDS - XML format, unable to read special characters in a string.

Hi All,
I've been using XML files to create my report with Oracle9i's new featue of PDS.
Now, I'm unable to read a file if it contains '&' or '<' in the string. In fact, the xml file itself not able to crate a xml page in the browser, if these special characters are present.
Is there any way to solve this problem ?
I can't tell the users to remove &, < from the description data. Is there any way to workaround for this ?
Thanks in advance,
Satya.

Hi Rohit and Rajesh
Thanks for your reply.
In fact, my problem is like this:
I'll get data in .txt file and save that as a .xml file in the network before calling Oracle report ,which gets data from the .xml.
The contents are like this:
<Comapy name> Ford Motors UK & Europe</Company name>
<Department> HR & Pensions</Depatrment>
<Salary>Grad4 < 25000 </Salary>
As per XML entity character representation, I need to replace '&' with '&amp;' and '<' with '<lt;'
I'm wondering is there any other way to solve this problem as it is difficult to replace '<' and '>' generically.
Honestly, I couldn't understand what Mr. Rajesh was trying to tell.
'for & use & ( with semicolon at the end)'
'for < use <'
'for > use >'
Can you shed some light on this ?
Many thanks
Satya.

Similar Messages

  • XSL-FO unable to read special characters from the XML file

    Team,
    please help on issue, when trying to read the text from XML file (Special characters like bullet). It is displaying as Question mark(?) in output in place of bullet..please proved any soultion.

    The "?" signals a character set mismatch issue - http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html - between client and database software

  • Tomcat unable to read accented characters from MySQL

    Folks,
    Can anyone help with me this problem?
    It seems that my version of Tomcat is unable to read accented characters from my MySQL Database.
    I've checked in the Database and the characters are all correctly represented there. But when, in my servlet code, I do:
    String author = results.getString("author_surname");If the String contains any accented character then the character shows as a '?'. (Even before it gets to the JSP - I'm writing the results straight to catalina.out).
    Looking around these forums I found that some people suggested adding
    ?useUnicode=TRUE&characterEncoding=UTF-8;to the end of my jdbc url. As in:
    <ResourceParams name="jdbc/connection">
    //a whole load of other params
      <parameter>
        <name>url</name>
         <value>jdbc:mysql://localhost:3306/bookshop?useUnicode=TRUE&characterEncoding=UTF-8</value>
      </parameter>
    </ResourceParams>inside my server.xml
    But it doesn't seem to make any difference. In addition, I doubt I even need to use Unicode as the accents I need are only: ����� etc.
    (Incidentally, writing that line into my server.xml, tomcat complains that it should finish with a semi-colon. Is that correct? Even if I put in the semi-colon, it still complains!!)
    Any suggestions on this would be much appreciated. Thank you.

    user13109986 wrote:
    HI,
    From http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/ch9.htm
    My understanding is the JDBC Api converts the string from the database to UTF-16.. If so is there any way to disable the UTF-16 encoding at JDBC API?That's exactly what it's supposed to do. There isn't even any concept of what it would mean to disable that: Java characters are UTF-16 representations of Unicode code-points, so there isn't anything else it could do.
    I still suspect the JDBC part is working correctly and your writing-to-file isn't. I found this quote in the Wikipedia article on Windows-1256:
    Windows-1256 is a code page used to write Arabic (and possibly some other languages that use Arabic script, like Persian) under Microsoft Windows. This code page is not compatible with ISO 8859-6 and MacArabic encodings.So was there a particular reason you chose Cp1256 and not ISO-8859-6 as the charset to write to the file with?

  • RegExp for excluding special characters in a string.

    Hi All,
    Im using Flex RegExpValidator. Can anyone suggest me the correct expression to validate this condition?....
    I have tried this expression :----- /^[^///\/</>/?/*&]+$/...But in this it is also negating the alphabets.Also I have tried with opposite condition that in the String we should have alphabets and the expression is:-- ([a-z]|[A-Z]|[0-9]|[ ]|[-]|[_])*..... Please can anyone help me on this.
    Thanks in advanced to all.
    Munira

    sorry but you are posting things back that do not make any sense
    what do you mean with the below comment?
    munira06 wrote:
    Yes you are correct ,but I have tried this with single special character
    say
    Re: RegExp for excluding special characters in a string.
    here is a sample app taken from the live docs
    using ^[a-zA-Z0-9 \-_]*$ as the regex accepts all characters from a-z, A-Z, 0-9 - [space] and_
    run the example tell me what regex you are using and what test strings fail when they should pass or pass when they should fail
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Simple example to demonstrate the RegExpValidator. -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import mx.events.ValidationResultEvent;
                import mx.validators.*;
                // Write the results to the
                private function handleResult(eventObj:ValidationResultEvent):void {
                    if (eventObj.type == ValidationResultEvent.VALID) {
                        // For valid events, the results Array contains
                        // RegExpValidationResult objects.
                        var xResult:RegExpValidationResult;
                        reResults.text = "";
                        for (var i:uint = 0; i < eventObj.results.length; i++) {
                            xResult = eventObj.results[i];
                            reResults.text=reResults.text + xResult.matchedIndex + " " + xResult.matchedString + "\n";
                    } else {
                        reResults.text = "";
            ]]>
        </fx:Script>
        <fx:Declarations>
            <mx:RegExpValidator id="regExpV"
                    source="{regex_text}" property="text"
                    flags="g" expression="{regex.text}"
                    valid="handleResult(event)"
                    invalid="handleResult(event)"
                    trigger="{myButton}"
                    triggerEvent="click"/>
        </fx:Declarations>
        <s:Panel title="RegExpValidator Example"
                width="75%" height="75%"
                horizontalCenter="0" verticalCenter="0">
            <s:VGroup left="10" right="10" top="10" bottom="10">
                <s:Label width="100%" text="Instructions:"/>
                <s:Label width="100%" text="1. Enter text to search. By default, enter  a string containing the letters ABC in sequence followed by any digit."/>
                <s:Label width="100%" text="2. Enter the regular expression. By default, enter ABC\d."/>
                <s:Label width="100%" text="3. Click the Button control to trigger the validation."/>
                <s:Label width="100%" text="4. The results show the index in the text where the matching pattern begins, and the matching pattern. "/>
                <mx:Form>
                    <mx:FormItem label="Enter text:">
                        <s:TextInput id="regex_text" text="xxxxABC4xxx" width="100%"/>
                    </mx:FormItem>
                    <mx:FormItem label="Enter regular expression:">
                        <s:TextInput id="regex" text="ABC\d" width="100%"/>
                    </mx:FormItem>
                    <mx:FormItem label="Results:">
                        <s:TextInput id="reResults" width="100%"/>
                    </mx:FormItem>
                    <mx:FormItem >
                        <s:Button id="myButton" label="Validate"/>
                    </mx:FormItem>
                </mx:Form>
            </s:VGroup>
        </s:Panel>
    </s:Application>

  • Need help in replacing special characters in a string

    Hi,
    please let me know the best way to replace all the special characters in a string with space.
    other than alphabets and numbers
    with regards.
    sumanth.

    please let me know the best way to replace all the special characters in a string with space.
    other than alphabets and numbers
    >
    Sumanth Nag Kristam wrote:
    > actually i need to replace hexa decimal char 0X1A in a string.... that is 'substitue' as per the chart
    > any pointers....
    >
    > chk the link for the ASCII codes
    > http://www.techonthenet.com/ascii/chart.php
    But in Hexa decimal value there is no special characters?

  • How to search special characters in a string

    Hi all,
    I want to search special characters in all string columns and all rows in the table.
    The table has about 5 string columns and about 5.000.000 rows. For each row and column, I have to search entries, which included special characters like ", !, ? or something else (f.ex. "Mama?Mia" or "!!!Hotel out of order!!!"). The problem, the character could stand at each position in the string.
    What's the best and most performance possibility to search such entries?? Is it possibility only by SQL; is there a special function for this?? Or must I use PL/SQL.
    Thanks for helping
    Dana

    HTH
    Laurent Schneider
    OCM DBA
    SQL> select * from z;
    S
    Mama?Mia
    a b c
    123
    SQL> select * from z where translate(s,'~ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz1234567890','~') is not null;
    S
    Mama?Mia
    SQL> select * from z where regexp_like(s, '[^[:alnum:][:space:]]');
    S
    Mama?Mia

  • Sample code to identify special characters in a string

    Hi,
    I need to identify special characters in a string.... could anybody send me some code please.......
    Thanks,
    Best regards,
    Karen

    data: str(100) type c.
    data: str_n type string.
    data: str_c type string.
    data: len type i.
    data: ofst type i.
    str = '#ABCD%'.
    len = strlen( str ).
    do.
      if ofst = len.
        exit.
      endif.
      if str+ofst(1) co sy-abcde.
        concatenate str_c str+ofst(1) into str_c.
      else.
        concatenate str_n str+ofst(1) into str_n.
      endif.
      ofst = ofst + 1.
    enddo.
    write:/ str.
    write:/ str_c.
    write:/ 'spacial chracter',20 str_n.
    Function module  <b>SF_SPECIALCHAR_DELETE</b> <b>DX_SEARCH_STRING</b>
    l_address1 = i_adrc-street.
    CHECK NOT L_ADDRESS1 IS INITIAL.
    len = STRLEN( l_address1 ).
    do len times.
    if not l_address1+l(1) ca
    'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '.
    if i_adrc-street+l(1) CO sy-abcde.
    elseif i_adrc-street+l(1) CO L_NUMCHAR.
    exit.
    endif.
    l = l + 1.
    enddo.
    data : spchar(40) type c value '~!@#$$%^&()?...'etc.
    data :gv_char .
    data:inp(20) type c.
    take the string length .
    len = strlen (i/p).
    do len times
    MOVE FNAME+T(1) TO GV_CHAR.
    IF gv_char CA spchar.
    MOVE fnameT(1) TO inp2T(1).
    ENDIF.
    T = T + 1.
    enddo.
    REPORT ZEX4 .
    PARAMETERS: fname LIKE rlgrap-filename .
    DATA: len TYPE i,
    T TYPE I VALUE 0,
    inp(20) TYPE C,
    inp1(20) type c,
    inp2(20) type c,
    inp3(20) type c.
    DATA :gv_char.
    data : spchar(20) type c value '#$%^&*()_+`~'.
    START-OF-SELECTION.
    CONDENSE fname.
    len = strlen( fname ).
    WRITE:/ len.
    DO len TIMES.
    MOVE FNAME+T(1) TO GV_CHAR.
    IF gv_char ca spchar.
    MOVE fnameT(1) TO inpT(1).
    ENDIF.
    T = T + 1.
    ENDDO.
    CONDENSE INP.
    write:/ 'Special Characters :', inp.
    Rewards if useful..........
    Minal

  • Unable to receive special characters in XML using UTL_HTTP request from Other application

    Hi Team,
    We are using SOAP request in Oracle Application to Pull XML data from Other application.I am using below commands before receving response but still i am unable to receive special charcters/Spanish Charcters in XML.
    utl_http.set_body_charset(v_http_req, 'UTF-8');
    utl_http.set_header (v_http_req, 'Content-Type', 'text/xml');
    Thanks and Regards,
    Raghul

    Hello,
    Just when you think that you know everything, it is slammed in your face that you don't. The .Mac member name field in the System Preferences DOES NOT take your whole e-mail address. It only takes your user name or whatever comes BEFORE the "@" symbol. There was absolutely nothing wrong with my MacBook Pro (other than ther brain dead user).
    Sorry for wasting your time...
    If we learn from our mistakes, then I obtained my PhD years ago,
    Dr. Z.

  • Unable to add special characters such as # and ( in headers of Report in Text format

    Hi,
    I am working on developing a report that will be exported to tab delimited text format from SSRS. The Report has been developed and it is getting exported to tab delimited text format. However, special characters in the heading are getting trimmed. I would
    like to get these special characters in the heading of text file. Any help in this regard will be appreciated.

    Hi Abhijit,
    Per my understanding that you have add an extension which export the report as .txt format, now the issue is the special characters"#" not display after exportted, right?
    I have tested on my local environment and can reproduce the issue , this is by default, when you type some special characters "#" as the textbox name  in the properties window or as calculatted field name you will get error pop up window,
    if you type the text in the textbox as "#" it will also not display in the CSV or tab delimited text format report.
    But we have some alternative method to make them display some way, more details information below for your reference:
    Display "#" in the table header
    If we want to make them display in the table header, we need to create an new table an put all the table header as one record in the table, because the value in the table can display "#" correctly:
    I assumed you have four columns as the table header(Test1#,Test2#,Test3#,Test4#) please create an new table (HeaderTable )to store these value:
    Create two dataset2:
    Dataset1: display the record from step1
    DataSet2:display the record of the report
    Create two Tablixs as below and both remove the header column, Tablix1(Dataset1) diplay the value comes from the step1 as the new header column:
     Tablix1(Dataset2):Report Data
    In this way, when export to tab delimited txt, you will got the table header display correctly.
    Display "#" in the textbox outisde of the tablix
    If you just want to display "#" outside the tablix, you can just add an calculatted field(Test) and use expression like below to specify the value which you want to display in the calculatted field:
    ="test######test"
    Then you can use below expression in the textbox:
    =first(Fields!Test.Value, "DataSetName")
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Reading special characters from a flat file and inserting into DB

    I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this?
    If i try to do the insert directly it works. It seems like the error occurs when reading this data into a variable
    thanks for the help
    Lalit Bhatia

    lalit, this is probably an character set problem, the default on Database creation tends to be 7bit Ascii which does not support special characters, it's been a while since I set up a db in this way, but you need to change settings in oracle.ini. The db will need to be restarted for this. Also, to check current settings try:
    select * from NLS_DATABASE_PARAMETERS
    You want an 8bit, unicode or multibyte character set. Sorry I cannot remember moer off the top of my head, try searching on NLS or character set

  • Can't read special characters in an excel file using JDBC

    Hi! I 've a code to read an excel file using JDBC-ODBC bridge. I can read the values, but any special characters is readed wrong, just symbols. The special characters are of spanish language. This is my code:
                    Locale currentLocale;
              currentLocale = new Locale("es", "MX");
              Locale.setDefault(currentLocale);
                   Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
                   c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=comisionesperfiles.xls");
                   stmnt = c.createStatement();
                   String query = "Select * from [Hoja1$]" ;
                   ResultSet rs = stmnt.executeQuery( query );
                   while( rs.next() ){
                        String valor = rs.getString(2) ;
                        if(valor != null && !"null".equalsIgnoreCase(valor)){
                             if(!comisiones.contains(valor)){
                                  System.out.println(valor);
                                  comisiones.add( valor );
                   rs.close();
                   stmnt.close();As you can see, I've tried to set the locale, but it didn't work.
    I'm using Excel 2003, Java Version 1.4.2_07 and Windows XP Professional (in latin american spanish).
    Hope someone can help me!

    FYI: Apache's POI can read/write Excel files in Java:
    http://jakarta.apache.org/poi/index.html

  • I am not able to convert a pdf file to a xml format using adobe reader 11. please tell me how to do the same!!!

    I have to upload a form in xml format. The file is in pdf format. I am using adobe reader 11. Please tell me how to export to xml format. There is no option for xml.

    Please give us a link to the instructions you are trying to follow.

  • File XML Content Conversion: Problem with special characters

    Hello,
    in a file sender cc content conversion is used to transform a flat structure to XML. What we experiencecd is that the message mapping failed due to a character that was not allowed in XML:
    I was assuming that the file content conversion just creates XML messages with allowed characters. Is there any way to configure content conversion to remove control characters which are not allowed in XML? Unfortunately the sender system cannot be modified.
    Thank you.

    Hi Florian,
      Please use this UDF to remove special characters which prevent XML messages to form properly.
    public static String removeSpecialChar(String s)
              try
                   s=s.replaceAll("&","& amp ;");
                   s=s.replaceAll("<"  , "  & lt ;");
                   s=s.replaceAll(">", "& gt ;");
                   s=s.replaceAll("'", "& apos ;");
                   s=s.replaceAll("\"", "& quot ;");
              catch(Exception e)
                   e.printStackTrace();
              return s;
    Please remove spaces between characters within double quotes. I have added them because otherwise you can't see this code properly. Please check this below link , please replace the characters with proper values as the display is causing a problem here   
    http://support.microsoft.com/kb/316063
    regards
    Anupam
    Edited by: anupamsap on Jul 7, 2011 4:22 PM
    Edited by: anupamsap on Jul 7, 2011 4:23 PM

  • Problem in reading special characters

    Hi friends
    I am doing one program which read serial port data (for bar code reader) using java application.
    My program is working well and reading serial data but it is not displaying special characters.When i read through hyperterminal i can see all special characters but when see data throught the output of java program these special characters are missing...
    I don't know i am doing something wrong in stream or ???
    My code is
    [CODE]public void serialEvent(SerialPortEvent event) {
              System.out.println("before serialEvent");
              StringBuffer readBuffer1 = new StringBuffer();
              switch (event.getEventType()) {
              case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
                   System.out.println("Data empty:");
                   break;
              case SerialPortEvent.DATA_AVAILABLE:
                      byte[] readBuffer = new byte[100];
                      int r = 0;
                      try {
                           System.out.print("test"); 
                          //t inputStream = serialPort.getInputStream();
                         while((r = inputStream.read(readBuffer)) != -1) {
                            System.out.print(new String(readBuffer, 0, r));
                      } catch (Exception e) {
                         e.printStackTrace(System.out);
    }[/CODE]Please help

    Hi DrClap,
    Thanks for your reply.
    That article was helpful in understanding character conversions. And it works fine for JSPs.
    But when I tried to apply the same in JSF it does not work. May be this is not the right forum to dicuss JSF related things. But if you know how pageEncoding and contentType can be mentioned in JSF. I am using myfaces and I have tried <h:form id="SearchForm" acceptCharset="UTF-8" accept="text/html;charset=UTF-8">. Didnt work....

  • XML Gateway - Hub Definition Password - Special Characters

    Our Marketplace provider is about implement mandatory special characters in the hub access user accounts. Our current configuration does not allow special characters in the hub definition.
    It there anyway to enter any symbol in the XML Gateway>Hub Definition>Password field.
    1) Are there any symbols that are not deemed "Special Characters", I have tried various without success.
    2) Can the password type be changes to allow symbols?
    Any help welcomed,
    Simon
    Swansea
    UK

    Actually this is the right forum to be in
    There are a few steps you need to do to configure BPEL with XML Gateway. This is what you did in 11i, may have changed for R12
    Here are the steps to setup BPEL output
    1. Choose responsibility 'XML Gateway' from left panel.
    2. From right panel choose 'Define Lookup Values' . Oracle forms application would open up.
    3. On XML Gateway Lookups form , press F11.
    4. In 'Type' field enter 'COMM_METHOD'(without quotes.
    5. Press CTRL+F11 . Form would fill from already present look ups. We are going to create new Lookup Value.
    6. On new row create look up as (Values without quotes) :
    - Code = 'BPEL'
    - Meaning = 'BPEL'
    - Description = 'Used for Apps Adapter Integration using BPEL'
    - Check 'Enabled' checkbox.
    7. Save form from File--> Save from menu bar. you can close this form.
    8. XML Gateway Navigator form would be presented.
    9. From right panel choose 'Define Trading Partners' .
    10. On Trading Partner Setup form , press F11 .
    11. In field 'Trading Partner Type' enter 'Supplier (without quotes).
    12. In field 'Trading Partner Name' enter ‘VENDOR-1' (without quotes).
    13. Go to Trading partner details and create new transaction as (Values without quotes)
    - Connection/Hub = 'DIRECT'
    - Protocol Type = 'BPEL'
    - Protocol Address = 'http://appsadapter.sample.com'
    cheers
    James

Maybe you are looking for

  • Animated GIF won't Animate while page is loading

    Hi all, I need my animated gif to be animated while other page elements are loading, but it is frozen until the page loads. Any advice? Regards, Kelly Personal Blog: http://thebitsthatbyte.com

  • Issue with Polish Language

    Hi, We are using SAP 3.1. In Polish Language, The meu's and sub menus are populating incorrectly. Meaning.. Its showing combination of "#" sign as this error only with Polish language and other languages is working fine. for example in screen,       

  • HT201263 iTunes doesn't open after I plug in the phone

    After trying to update to ios 7.0.6, iTunes doesn't open after I plug in the phone and doesn't show the message "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes.", which it should. What d

  • Displaying the page footer at the bottom most part of the page

    Hi , I am using page footer region inside the jspx page under </af:panelBorder> tag , it is showing my region where the last TAG ends but i want to show the region at the bottom most of my page i.e. i need some vertical white spaces so that the regio

  • Blurr effect in Flash

    Hi, I was wondering if someone would be able to point into the right direction as to achieving this type of blur like they have on this webpage? I would like to create something similiar where a user would be able to see some pictures but as the pict