To remove "&amp" from XML generated file.

Dear All,
I am facing one problem, when XML file is getting generated.
Here when ever special character comes like "&", it shows me in the output of XML file as "&amp".
How should it be avoided? Pls require some suggestions.

Dear Jorg,
Ya that's absolutely true, as i am not getting any error but want to fix that because when i download that XML file, after that i have to again upload that to some portal.
So i request for the solution if anything could be done with it.
Thank You
Vishvesh

Similar Messages

  • How do I remove & amp; from XML?

    Hello,
    DB: 11.1.0.7.0
    I am trying to use XMLAGG to concatenate multiple fields delimited by "|". However, if the fields have characters like "&" or "<" they are being transformed in the XML. How do I convert them back?
    SELECT rtrim (xmlagg (XMLELEMENT (E, mck.concatenated_segments||', ')).extract ('//text()'),', ') concatenated_segments
      FROM mtl_category_sets mcs,
           mtl_item_categories mic,
           mtl_categories_kfv mck
    WHERE mcs.category_set_name = 'LiDestri Costing Sub Category'
           AND mic.inventory_item_id = 5862
           AND mic.organization_id = 98
           AND mic.category_set_id = mcs.category_set_id
           AND mck.category_id = mic.category_id
           AND mck.structure_id = mcs.structure_idResult (space added so it is not converted in html)
    BRANDY &lt ;= 170 PROOFDesired Result
    BRANDY <= 170 PROOFHow can I convert it to remove the & amp; type symbols?
    Thanks in advance,
    --Johnnie                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Johnnie,
    Use XMLCast :
    select rtrim(
             xmlcast(
               xmlagg(
                 xmlelement(e, mck.concatenated_segments || ', ')
               as varchar2(4000)
           ) as concatenated_segments
    from ...

  • How to remove Unicode from XML file

    I get following error when unmarshal xml:
    [java] org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x15) was found in the element content of the document.
    Anyone know how to remove Unicode from xml file? Can I remove the unicode by rebuild the file?
    Thanks

    These sort of error usually occur when you're using a different character encoding to read the file than the one you wrote it with. Perhaps if you were to post the problem section of the file and/or the code that created it in the first place.

  • Remove element from xml using dom.

    i want to remove an element from an xml file using dom.
    i remove the element but the whole content of the file is also deleted.
    how can i rewrite the file.

    vij_ay wrote:
    subject :Remove element from xml,but if empty element in input file then output should be <tag></tag>, not like <tag.xml/>I assume you mean <tag/> but why do you want this? Any application that will not accept this valid XML construct is flawed and a bug report should be raised against it.

  • Removing namespace from xml

    Hi,
    I have an xml which has some target namespace.
    I need to remove the namespace and the qualifiers and put it on a machine using a file adapter.
    Any help in this regard is highly appreciated.
    With Regards,
    Harsh

    Please go throught the below link
    Removing namespace from xml  created

  • Remove  Namespace from XML File except Attribute

    Hi  XI  Experts ,
    1.I have referred to the code of xslt Generic XSLT Code to Remove ALL Namespaces from XML:
    http://forums.sdn.sap.com/thread.jspa?threadID=1920630
    But this removes the Attribute : id  from the records .
    My expected output is supposed to be :
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record id="1">
           <fpdm></fpdm>
        </record>
    </data>
    </body
    But after using this XSLT code it removes :id from <record_1 id=> and generated the below code :
    The xml file now doesn't contain teh attribute :id
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record>
          1
          <fpdm></fpdm>          
           </record>
    </data>
    </body>
    Could  you please provide your input
    Plaese note : Here  XI versin iS x1 3.0 SP7 . I have tried suing the Analyzer bean for the Encoing  of Chinese : GBK Intsead of UTF-8 in the Namespace  . But AF_Modules/XMLAnonymizerBean is not comptacible with XI 3.0 SP7
    Hence i have used the following code to remove namespcae and add  Encoding :GBK instead of UTF-8:
    <?xml version="1.0" ?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output encoding="GBK"/>
    <xsl:template match="node()|@*">
      <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>

    You could use exclude-result-prefixes.
    For example:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wt="http://www.example.com" exclude-result-prefixes="wt">
    </xsl:stylesheet>

  • Removing color from a PDF file

    I am trying to remove the colors from a PDF file.
    To do this I print it to "Adobe pdf" setting the parameter in the Paper/Quality tab, Black & White.
    But in the generated PDF the color is still there !
    How can I remove the color from a PDF file ?
    Tks.

    Try the print production options under the Advanced menu.

  • Use of PL/SQL to populate table columns from XML data file

    I'm trying to find the easiest way to transfer data from a flat file that is in XML format into a traditional Oracle table. Not retaining the XML but actually map an XML element to a column so standard SQL, Forms, Reports, etc can access like it was created using a Form.
    Example: Table A has column names Tom, Dick and Harry and the XML file has elements Tom, Dick and Harry and I just want a function that maps and inserts/loads the data into Table As individual columns.
    The process needs to be easily initiated by an end user. The user gets the XML data file via an email attachment and needs to do something like a Concurrent Request to pull in the file and load it. Using PL/SQL would be great.
    I appreciate any help that can be provided.

    Hi,
    HELP!!!!!
    We are having the same problem and we are using oracle 10ir2.
    We create an object type (sql type globally not in a package):
    CREATE OR REPLACE TYPE G_EX AS OBJECT
    ( EX_ID NUMBER ,
    EX_CON VARCHAR2 ( 100 ) ,
    EX_L VARCHAR2 ( 30 ) ,
    EX_T VARCHAR2 ( 4000 ) );
    CREATE OR REPLACE TYPE G_EX LIST AS TABLE OF  GEX AS ;
    then we insert data through a bulk collect within the package with the table declared of this array of object types:
    v_table G_EX _LIST:= NULL;
    SELECT G_EX (ex_id
    ,ex_con
    ,ex_l
    ,ex_t )
    BULK COLLECT INTO v_table
    FROM exs_lookup;
    I am using the syntax (below) but it gives PL/SQL: ORA-00902: invalid datatype
    sometimes not always:
    SELECT G_EX ( ex_id
    ,ex_con
    ,ex_l
    ,ex_t )
    BULK INTO v_data_record
    FROM TABLE (v_table)
    WHERE ex_id = p_key;
    where p_key - is a number type
    and v_data_record is a G_EX object type.
    I was wondering if anyone else encountered a similar problem, and knows what we may have done wrong. Since we dont understand why this piece of code is throwing this ora-00902 errors occasionally not always.
    Also, if we restart the database up once this errors occurs it appears to stop throwing this ora_00902 error for a lenght of time. Then it comes up with the ora-00902 error again (why?)
    thanks

  • Data Import from XML Format file

    I want to import data  from XML file format.Can i do it ? If yes then please give me more details in the step.

    Pl read the below link.
    It will be helpful.
    SAP Business One Application
    Jeyakanthan

  • [solved] remove packages from a txt file list

    as the subject header says, I want to run "pacman -R" and have it read a list of packages from a text file.
    Is this possible????
    text file is formatted as such....
    file1
    file2
    file3
    Last edited by orphius (2013-07-09 08:11:53)

    Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

  • Script code sample for looping  through the records from xml data file in formCalc script

    Hi
       I have a xml data file which contains a sequence of repeating applicant data like given below
                       US
                       II
                       CEO
                       Mr
                       111111111
                       0000000111
                       GuarantorA
                       111
                       IN
                       11111
                       WILLIAMS1
                       R3
                       KENNETH1
                       City1GU
                       PA
                       1934-03-14
                       [email protected]
                       GU
                       R
                       113 Lazlo LaneCA
                       Suite 3500CA
                       OaklandCA
                       TX
                       11345
                       AL
    I want to assign a textfield with a value based on the value of coap_flag.
    So i need to loop through all the record and check the value of coap_flag and then assign the textfield a value based on that.
    I am new to Adobe livecycle...Please help me how it can be done.
    I have developed something like this
    foreach Item in ($record.applicant[*].coap_flag) do
    test.value=Item
    if(test.value=="MA")then
    concat($record.applicant.first_name,$record.applicant.middle_name)endif
    endfor

    Using the data you posted in the forum, I copied it a couple of times to give multiple records and used this code to extract the different values that you wanted. I had to wrap it in a <root> node that I called root (to make it valid XML). In my case I wrote the extracted values to a field, but in your case you can do whatever you want with them. Note that this was done in javascript:<br /><br />var currentElement;<br />var obj;<br /><br />//Get the nodes below the root node in the dataDom<br />obj = xfa.datasets.data.root.nodes;<br /><br />//Set an initial value for the textField<br />TextField1.rawValue = "The values of the coap_flag are: ";<br /><br />//Loop through the nodes in the obj set <br />for (i=0; i< obj.length ; i++){<br />     //set the currentElement to the 1st child node<br />     currentElement = obj.item(i);<br />     //Check to see if it is an applicant node<br />     if (currentElement.name == "applicant"){<br />          //It is an applican, now find the coap_flag node value and write it to the text field<br />          TextField1.rawValue += "\n" + xfa.resolveNode("xfa.datasets.data.root.applicant[" + i + "]").coap_flag.value;<br />     }<br />}

  • Loop through the records from xml data file in formCalc script

    Hi
       I have a xml data file which contains a sequence of repeating  applicant data like given below
                               US
                                II
                                CEO
                                Mr
                                111111111
                                0000000111
                                GuarantorA
                                111
                                IN
                                11111
                                WILLIAMS1
                                R3
                                KENNETH1
                                City1GU
                                PA
                                1934-03-14
                                [email protected]
                                GU
                                R
                                     113 Lazlo LaneCA
                                     Suite 3500CA
                                     OaklandCA
                                     TX
                                     11345
                                     AL
    I want to assign a textfield with a value based on the value of coap_flag.
    So i need to loop through all the record and check the value of coap_flag and then assign the textfield a value based on that.
    I am new to Adobe livecycle...Please help me how it can be done.
    I have developed something like this
    foreach Item in ($record.applicant[*].coap_flag) do
    test.value=Item
    if(test.value=="MA")then
    concat($record.applicant.first_name,$record.applicant.middle_name)endif
    endfor

    Using the data you posted in the forum, I copied it a couple of times to give multiple records and used this code to extract the different values that you wanted. I had to wrap it in a <root> node that I called root (to make it valid XML). In my case I wrote the extracted values to a field, but in your case you can do whatever you want with them. Note that this was done in javascript:<br /><br />var currentElement;<br />var obj;<br /><br />//Get the nodes below the root node in the dataDom<br />obj = xfa.datasets.data.root.nodes;<br /><br />//Set an initial value for the textField<br />TextField1.rawValue = "The values of the coap_flag are: ";<br /><br />//Loop through the nodes in the obj set <br />for (i=0; i< obj.length ; i++){<br />     //set the currentElement to the 1st child node<br />     currentElement = obj.item(i);<br />     //Check to see if it is an applicant node<br />     if (currentElement.name == "applicant"){<br />          //It is an applican, now find the coap_flag node value and write it to the text field<br />          TextField1.rawValue += "\n" + xfa.resolveNode("xfa.datasets.data.root.applicant[" + i + "]").coap_flag.value;<br />     }<br />}

  • How to remove namespace from xml in ALSB?

    I have a xquery transformation which works for data without namespace. But the data coming from source system has namespace details in it. Is there a way to strip the xml of namespace details from xml before passing it to xquery transformation?

    Hi
    silly mistake :P
    Following 'bold' declaration was not there!!
    Just copy paste following code as xquery and it will be all ok:
    declare namespace xf = "http://tempuri.org/vijfhuizen/com/myMessage/";
    declare function xf:strip-namespace($e as element())
    as element()
    element { xs:QName(local-name($e)) }
    for $child in $e/(@*,node())
    return
    if ($child instance of element())
    then xf:strip-namespace($child)
    else $child
    declare variable $e as element() external;
    xf:strip-namespace($e)

  • DataWriter - removing attributes from xml tag at the start of document

    Hi,
    I'm using DataWriter for generating a large XML document, however I do not want the attributees of the starting xml tag to appear in the final file.
    Eg: <?xml version="1.0" {color:#ff0000}encoding="UTF-8" standalone="yes"{color}?>I do not want to output the part highlighted in red.
    What could be the possible ways to do it? I prefer if it can be removed in the begining itself instead of parsing the document and removing in the end.
    -TIA, saum
    Edited by: nkrust on Feb 15, 2010 4:29 PM

    try {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        Marshaller marshaller = new Marshaller(new OutputStreamWriter(
                                  baos));
                        marshaller.marshal(ResponseContents);
                        // Create an object of type Document from the XML document
                        // created.
                        DocumentBuilderFactory domFactory = DocumentBuilderFactory
                                  .newInstance();
                        domFactory.setNamespaceAware(false);
                        DocumentBuilder builder = domFactory.newDocumentBuilder();
                        responseDoc = builder.parse(new ByteArrayInputStream(
                                  ResponseUtils.formatXMLString(baos.toString())));
                   } catch (IOException e) {
                        e.printStackTrace();
                        System.out.println(e.getMessage());
                   }

  • How to remove indents from XML?

    I have a xml like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <view>
         <help>
              <block>No.1</block>
              <device>USB</device>
         </help>     
    </view>
    How could I output the xml to :
    <?xml version="1.0" encoding="UTF-8"?><view><help><block>No.1</block>          <device>USB</device></help></view>
    The reason to output like this is to make the xml comparison passed.
    I use org.custommonkey.xmlunit.XMLTestCase.compareXML to compare two xml string, one from Java code, the other from C# code. Now, since there are new lines and whitespaces embedded in the Java generated XML, the comparison always failed. Is there any way to output the indent xml to the one string only?

    Try running the strings through something like this before comparing:
    String <stringname> = <stringname>.replaceAll("\\n|\\t|\\s|\\r", "");
    that should normalize them both to no spaces, tabs, newlines, carrage returns.

Maybe you are looking for

  • How to conver the oracle data into xml files

    Hi All, I have a table for ex emp, now i want to generate every row into an xml file. could anyone pls help... ex:- emp table eno ename sal 1    bond  3000 2    kiran    2000 3    jai       1000 4    henry   500 o/p :-  i have to get a column in 4 di

  • Date field encryption using Dbms_Obfuscation_Toolkit.DESENCRYPT

    Hi, I need to encrypt the date field in the table using Dbms_Obfuscation_Toolkit.DESENCRYPT . This is an table is an existing table and is accessed by many interfaces, so we cannot change the column type of this date field. Is there a possibility of

  • Dynamic linking of third party frameworks

    Hi,    does flex also supports linking of third party frameworks as RSL in flex application .  i  think currently only flex framework is dynamically linked ?

  • AirPlay to multiple AppleTVs - will sound be in sync?

    I am currently researching options on how to get music to multiple rooms synchronously. I don't need any fancy multiroom "play different music in every room" options, I just want the same music to play in every room, and I don't want to lay cables. T

  • Secure Zone List?

    How would I go about listing everyone that is subscribed to a secure zone? So say there are 25 people subscribed to zone A, and I log in, and it shows me all 25 of those people. (On the website not Back-Office).