How to remove ?xml version="1.0" encoding="UTF-8"? in receiver payload

hi experts,
    how to remove <?xml version="1.0" encoding="UTF-8"?> from receiver payload.
my source srtucture is ,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:entity-data xmlns:ns0="http://www.xxx.com">
<Customer>
<CustNo>xxx</CustNo>
</Customer>
</ns0:entity-data>
in receiver payload i dont wont " <?xml version="1.0" encoding="UTF-8"?> "
i want receiver payload
<ns0:entity-data xmlns:ns0="http://www.xxx.com">
<Customer>
<CustNo>xxx</CustNo>
</Customer>
</ns0:entity-data>
can any one provide me the solution for this.
regards,
ganesh

hi vijayakumar,
     thanx for ur response....

Similar Messages

  • How to remove ?xml version="1.0" encoding="UTF-8"? .

    HI Experts,
                      i am doing one scenario file to file . in soruce payload i have <?xml version="1.0" encoding="UTF-8"?> . i want to remove <?xml version="1.0" encoding="UTF-8"?> at target side. is it possible .
    regards,
    alekhya.

    Hello,
    i want to remove <?xml version="1.0" encoding="UTF-8"?> at target side. is it possible .
    You can use XSLT and add
    <xsl:output method="text" version="1.0" encoding="UTF-8" omit-xml-declaration="yes"/>
    in your output declaration
    Hope this helps,
    Mark

  • Remove ?xml version="1.0" encoding="UTF-8"?   from XML doc

    I have generated an XML file using javax XML transformer. In the XML file thats generated I have the version and the encoding line
    <?xml version="1.0" encoding="UTF-8"?>
    which is automatically generated in my XML file. Is there any way that I can avoid that from the XML file thats generated.
    Here is the transformer that I have used.
    public static void printToXML(String fileName){
               try{
                    File file = new File(fileName);
                    Transformer tr = TransformerFactory.newInstance().newTransformer();
                    tr.setOutputProperty(OutputKeys.INDENT, "yes");
                    tr.setOutputProperty(OutputKeys.METHOD,"xml");
                    tr.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "3");
                    tr.transform( new DOMSource(dom),new StreamResult(new FileWriter(file)));
               }catch(TransformerConfigurationException tcex){
                    logger.info("TransformerConfigurationException at printToXML method in CSVtoXML.java");
                    logger.error("TransformerConfigurationException", tcex);
               }catch(TransformerException tex){
                    logger.info("TransformerException at printToXML method in CSVtoXML.java");
                    logger.error("TransformerException", tex);
               }catch(IOException ioex){
                    logger.info("IOException at printToXML method in CSVtoXML.java");
                    logger.error("IOException", ioex);
          }

    Well, it is a pretty important line. Why do you need it removed? Anything that really processes XML knows how to read it and determine what encoding was used. That is vital, if you look at the number of questions posted here about foreign language text in XML. If you really have a text processsor that knows how to open a file called something.xml, and knows how to process or ignore most of the pointy bracket things, but not this one, it is time to fix it.
    Dave Patterson

  • Can we option or property to remove xml prolog ?xml version="1.0" encoding="UTF-8"? )  in atg server

    Hi
    i have a doubt if any one knows please let me know.
    in atg rest service(POST Request) i am sending request as xml and also i am expecting response as xml
    i have configured to get response as xml,but i want to delete xml prolog<?xml version="1.0" encoding="UTF-8"?>)  from my response can we have property to remove  xml prolog by using  atg server.
    thanks in advance
    bala

    Hello Soumya,
    Good to know it worked, I have got some doubts of using XPATH have U ever worked on that, let me know.
    Bye,
    Sam Mathew

  • How to insert ?xml version="1.0" encoding="utf-8"? before an element

    Hi, I have a message which must contain XML inside XML, this internal one must start off with the <?xml version="1.0" encoding="utf-8"?> string.
    Is there a nice trick for inserting this before an element? (not at the beginning of the mapping, a specific place further inside the XML).
    All of the other elements are mapped as part of the message type.

    Did you check Message Mapping : Play around with target structure .
    You can do this easily with UDF.
    public String setPrevalue(String var1,Container container) {
         StructureNode node = ((StructureNode) container.getParameter("STRUCTURE_NODE"));
         node.setPreValue("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
         return""; 

  • Remove ?xml version="1.0" encoding="UTF-8"? from xml file

    I have generated an XML file using sax paraser. In the XML file thats generated I have the version and the encoding line
    <?xml version="1.0" encoding="UTF-8"?>which is automatically generated in my XML file. Is there any way that I can avoid that from the XML file thats generated.

      try
                            FileWriter fr = new FileWriter(new File(path, fileName));
                            Document docNode = docNodeMap.get(name);
                            XMLOutputter outputter = new XMLOutputter();
                            outputter.output(docNode, fr);
                            fr.close();
                    catch (IOException e)
                            e.printStackTrace();
                    }this the code generating xml file.

  • XML - including: " ?xml version="1.0" encoding="UTF-8"? "

    When I parse an XML document and output:
    #xmlCode.XMLRoot.property.autoID#
    I get this line before every field: <?xml version="1.0"
    encoding="UTF-8"?>
    eg.
    <?xml version="1.0" encoding="UTF-8"?>
    <autoID>19</autoID>
    <?xml version="1.0" encoding="UTF-8"?>
    <autoID>53</autoID>
    <?xml version="1.0" encoding="UTF-8"?>
    <autoID>59</autoID>
    How do I stop this? I just want the number from the field.
    I also don't understand why it is UTF-8 when I specify
    iso-8859-1.

    If you use the CFXML tag, you dont need to do the <?xml
    version='1.0' encoding='iso-8859-1'?> line in your code. It will
    do it for you automatically.
    Remove it and it should be fine.
    EX:
    <cfxml variable="rsPropDataXML" casesensitive="no">
    <allData>
    <cfoutput query="rsPropData" maxrows="20">
    <property>
    <autoID>#rsPropData.autoID#</autoID>
    <Tour>#rsPropData.Tour#</Tour>
    </property>
    </cfoutput>
    </allData>
    </cfxml>

  • Append with out duplicates ?xml version="1.0" encoding="UTF-8"? in receiv

    Hi,
    When I am Using append mode in file adapter,for each file that i send a seperate <?xml version="1.0" encoding="UTF-8"?>  tag is getting generated in the target.
    eg:
    File 1
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e1</name>
    </DEPT>
    File 2
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e2</name>
    </DEPT>
    Result
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e1</name>
    </DEPT>
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e2</name>
    </DEPT>
    Here <?xml version="1.0" encoding="UTF-8"?> tag is repeated.
    How to remove the same from 2nd time.so that my output file is displayed as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e1</name>
    </DEPT>
    <DEPT>
    <name>e2</name>
    </DEPT>
    Thanks in advance
    sree

    Hi
    Did you check the occurence of DEPT Node as 0..unbounded???
    Did You check the output from Test tab of Message Mapping???
    Did You use the Node function in mapping???
    if not
    You better use either Java mapping
    with regards
    Gabriel

  • Adding  " ?xml version="1.0" encoding="UTF-8"? "   in generated xmls

    Hi,
    I am using xmlbeans framework to generate xmls , i am able to generate xml using document object but header "<?xml version="1.0" encoding="UTF-8"?>" is not coming in that xml file , how to include this in output xml files.

    Hi,
    I don't know the XMLBeans Framework, but this header is called XML declaration.
    In general there are options to configure this (i. e. setOption("omit-xml-declaration", false);).
    Anyway, I don't know the exact syntax in this framework but have a look at this, maybe it helps somehow.
    http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlOptions.html#setSaveNoXmlDecl()
    Best Wishes
    esprimo

  • Printing ?xml version=\"1.0\" encoding=\"UTF-8\"? at the top of my xml

    Can anyone spot where I'm going wrong?
    I'm creating a DOMDocument like this:
    Document document = null;
    DocumentBuilder doc_builder = null;
    try
         doc_builder = factory.newDocumentBuilder();
    catch(ParserConfigurationException e){/* deal with exception*/}
    document = doc_builder.newDocument();Adding various stuff to it, then saving it like this
    Source source = new DOMSource(document);
    Result result = new StreamResult(idx);
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.setOutputProperty(OutputKeys.METHOD, "xml");
    xformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); //??????
    xformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
    xformer.setOutputProperty(OutputKeys.INDENT, "yes");
    xformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    xformer.transform(source, result);All the usual stuff.
    But how do I get it to write:
    <?xml version=\"1.0\" encoding=\"UTF-8\"?>
    at the top of the page?
    One further thing...
    If I have nothing to write in my xml file, it just spits out a blank file.
    Instead, I want it to write:
    <?xml version="1.0" encoding="UTF-8"?>
    <upIdx/>
    a simple:
    document.createElement("upIdx");doesn't appear to do anything if the block "upIdx" is subsequently empty.
    Many thanks

    duugggh....
    (well it is friday evening.. ... long week.. all that kind of stuff)
    how stupid of me....
    to answer my own question, it was here:
    xformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); //??????
    xformer.setOutputProperty(OutputKeys.VERSION, "1.0");
    xformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");

  • ?xml version="1.0" encoding="UTF-8"? in my output

    Hi,
    I am parsing an XML file Using XSL.
    BY using this:
    transformerFactory tFactory = TransformerFactory.newInstance()
    Transformer transformer = tFactory.newTransformer(new StreamSource("my.xsl"));
    StringWriter sos =new StringWriter() ;
    transformer.transform(new StreamSource("myyl.xml"), new StreamResult(sos));
    I m able to parse but I am also getting <?xml version="1.0" encoding="UTF-8"?> in my output.
    Could you please tell me how I can avoid it. Thanks!!

    Hello Soumya,
    Good to know it worked, I have got some doubts of using XPATH have U ever worked on that, let me know.
    Bye,
    Sam Mathew

  • ?xml version="1.0" encoding="UTF-8" ? is missing

    HI,
    My scenario:
    Http Post ->PI---->Siebel
    When they post from source to PI. In source file  <?xml version="1.0" encoding="UTF-8" ?> is missing.
    It is failing in Request Message Mapping step in pipeline.
    Can we append this <?xml version="1.0" encoding="UTF-8" ?> when it is coming to PI.
    Kindly tell me how to acheive this issue.
    Take care.
    Preetha

    Hi aamir,
    I did  exactly what u told but i am getting following error in pipeline step - Request Message mapping
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">TRANSFORMER_CONF_EX</SAP:Code>
      <SAP:P1>mapping/Mapping.xsl</SAP:P1>
      <SAP:P2>http://abc.com/LMIChat</SAP:P2>
      <SAP:P3>eed947a0-59c5-11de-b473-f9eb401c9ba9</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error when loading XSLT mapping of the application</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Trace Info:
    Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Transformer configuration exception occurred when loading XSLT mapping/Mapping.xsl (http://abc.com/LMIChat, eed947a0-59c5-11de-b473-f9eb401c9ba9, -1) at com.sap.aii.ibrun.server.mapping.MappingPool.checkOut(MappingPool.java:114) at
    Aamir what i need to do now.... Will there be any error in code....

  • ?xml version="1.0" encoding="UTF-8"? coming twice in payload

    Hello SOA Gurus,
    I am working on a BPEL process, which produces message in JMS Queue and another process consumes the same.
    Issue I am facing is
    *<?xml version="1.0" encoding="UTF-8"?>*
    *<?xml version = '1.0' encoding = 'UTF-8'?>*
    <Exception xmlns="http://xmlns.xxxx.com/EBS/xsd/ExceptionDetails">
    <InterfaceID>001</InterfaceID>
    <InterfaceName>Test Interface</InterfaceName>
    <KeyID>000001</KeyID>
    <KeyName>Emp ID</KeyName>
    <FaultName>DOB Missing</FaultName>
    </Exception>
    XML Encoding is getting populated twice, Can anyone help me if fixing this.
    Thanks,
    Sunil

    please let us know,how you are trying to copy the variables.

  • Client Java Proxy - ?xml version="1.0" encoding="UTF-8" tag missing

    Hi All,
    I have a Java Proxy to File scenario. I am getting the output in the SAP XI but when i check the XML payload <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> is missing from it. Rest of the document is coming fine.
    Any idea how to fix it up?
    Thanks and Regards,
    Anurag Mahendru.

    Here it is:
    Re: ABAP Proxy -> XI - > File on a Website
    As I know, this is still on discussion, if the Java Proxy generation will be replaced by web service proxy generation.
    But existing Java Proxy applications definitivley  will run in PI 7.1 as well.
    Regards
    Stefan

  • Parse xml cannot handle first line of " ?xml version="1.0" encoding="UTF-16

    Hi,
    I'm trying to use applescript to parse a few element values from an xml file. It only works if the xml file does NOT have an "<?xml...?>" entry on the first line. The production xml files I use will always have the <?xml...?> entry on the first line. I need to know how to code around it.
    Here are two sample files. The first does NOT work, the second DOES work. The only diff is the <?xml...?> line in the first sample.
    Sample 1:
    <?xml version="1.0" encoding="UTF-16"?>
    <alldata>
    <valuea>a</valuea>
    <valueb>b</valueb>
    <valuec>c</valuec>
    </alldata>
    Sample 2:
    <alldata>
    <valuea>a</valuea>
    <valueb>b</valueb>
    <valuec>c</valuec>
    </alldata>
    Here's my simple script:
    set theXML to "path:to:folder:alldata.xml"
    tell application "System Events"
    tell XML element 1 of contents of XML file theXML -- root element
    set value_a to (value of XML element "value_a")
    end tell
    end tell
    The error returned when using the first file format is:
    error "System Events got an error: Can’t get XML element \"value_a\" of XML element 1 of contents of XML file \"ath:to:folder:alldata.xml\"." number -1728 from XML element "value_a" of XML element 1 of contents of XML file "path:to:folder:alldata.xml"
    Any feedback is appreciated.
    NOTE: I am not able to use any third party xml tools for this. This script must use default xml tools, e.g., "System Events". Thanks.

    Your first script example works for me. I don't know what you are using to create the data file, but one thing to look at would be to make sure the actual file encoding matches your encoding declaration, and that it is plain text.

Maybe you are looking for

  • Session variables is not getting updated in JSP

    Hi Floks, I had a situation where in i need to populate the drop down depending on the action perfomed by user in menus. An action method is triggered to load the scneario specific values to drop down here is that    PSSBuilder pssbuilder = new PSSBu

  • Can I transfer my passbook boarding pass onto a new handset?

    My new iphone 5 handset is being delivered today and I'm worried that the boarding passes for tomorrow's holiday will not transfer from my old handset to my new one via itunes. Or can I just go to the airlines website and download the same passes ont

  • Complex SQL Query in BPEL DB Adapter

    Hi, Is it possbile to write a complex query in BPEL DB Adapter using "Custom SQL Query"? I would like to write an IF ELSE condition in the DB Adapter similar what is given below.. IF((SELECT COUNT(*) FROM F5898001 WHERE CT58SRCNME = 'CA_TEST' AND CTJ

  • How to make Start Date as optional parameter in Crystal reports 2011

    Hi All, I have existing Start Date and End Date parameter how to make them as optional parameters. Thanks for your help in advance!!.

  • Squeaking noise when switching screens in iTunes 10

    To begin, I have had this problem since iTunes 9. When I click on an album in iTunes (in the view which displays all of the album covers but is not the cover-flow view) and that albums particular songs come up there is a squeaking noise that sounds s