Delete xml version in xml file

Hello,
I have a strange thing to do. I need to delete xml version tag (<?xml version="1.0" encoding="utf-8" ?>) from en xml file. I use a receiver file adapter and I want to know how it's possible to delete this tag.
I need to do that as receiving application collects xml messages and adds xml version in collected xml file.
Thanks in advance,
Cédric

hi Udo,
>>>and clever...
so it should be you who proposed it:)
BTW
I'm not sure if with XSLT you won't have to
do it in the commnication channel (and not in the interface mapping) - (the xslt mapping)
but I cannot test it right now
Regards,
michal

Similar Messages

  • Deleting previous versions of file in RSC

    Is there a way to delete earlier versions of a file or group
    of files within a RSO3 database? I've looked through the
    documentation and have had no luck.
    Example: I want to delete all versions of topics prior to
    release 1.0.

    Hmm. I'd thought that you could delete old versions of
    topics, but I don't see a way to do it, either. Sorry. Generally,
    there's not a need to do that, though.
    G

  • Delete old versions of PS?

    I had a lot of trouble getting PS 5.1 working on my computer because of license issues and have been afraid to delete older versions of PS thinking it might hose things again.
    I have CS 3, Bridge 3, CS5, and Bridge 5 installed.  Can I delete them?

    If you really are not desperate for HD space the best advice is to leave them as is.  They should not affect one another as they are.
    Deleting old versions can cause file associaton and other file access problems.

  • Delete xml messagetype tag and xml versioning tag in target xml file

    Hi experts.
    i want to delete the xml version, starting (<MT_ZMPSSERRMSGMST_SEND>*and ending </MT_ZMPSSERRMSGMST_SEND> tags in below message.
    here i am bold the tags which i want to delete. please help me how to delete this.
    <?xml version="1.0"; encoding="UTF-8"?>
    <MT_ZMPSSERRMSGMST_SEND>
       <MESSAGE>
          <TABLENAME/>
          <ACTION/>
          <RECORD>
             <ERRORID/>
             <ERRCLASSID/>
             <SHORTDESC/>
             <DESCRIPTION/>
             <RESOLVE/>
          </RECORD>
       </MESSAGE>
    </MT_ZMPSSERRMSGMST_SEND>

    Hi Srinivas,
    You can delete the required content of the XML by editing the XML.
    Develop a custom adapter module and use the below code to edit the xml and deleting the highlighted content
    // to read the input XML
    strData = xmlData.getText();
    // get the length of <?xml version="1.0"; encoding="UTF-8"?> <MT_ZMPSSERRMSGMST_SEND>
    int strheaderlength = (strData.substring(0,strData.indexOf("<Message>")).length());
    // read the data from <MESSAGE>  to </MESSAGE>
    String payload=strData.substring(strheaderlength,strData.startIndexOf("</MT_ZMPSSERRMSGMST_SEND>"))
    // set the new payload to xmlData
    xmlData.setText(payload);
    appreciate if useful

  • HTTP Receiver Adapter - delete ?xml version="1.0" encoding="UTF-8"?

    Hi,
    Is it possible to delete the part below when sending an HTTP request through HTTP receiver adapter without any java/abap/xslt mapping?
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_SELL xmlns:ns0="http://test.com/Sell">
    Thanks
    Arman

    Hi,
    <?xml version="1.0" encoding="UTF-8"?>
    Specifies that the given message is xml
    <ns0:MT_SELL xmlns:ns0="http://test.com/Sell">
    Specifies its a MessageType of the payload, without this that message is not identifies and is not processed. Its manditory to have these. Other wise error will raise.
    Regards,
    Prasanna

  • 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.

  • The wsdll file less of ?xml version="1.0"?

    Today I created webservice with NWDS. I successfully created the webservice and I can see it through http://localhost:50000/wsnavigator.  But when I viewed the wsdl of the service, I found the wsdll file less of <?xml version="1.0"?>. You konw, as an xml file it must has this header to prove it is an xml file. I used NW7.1 and followed the "Creating the HelloWorld Web Service" help document. It is on http://help.sap.com/saphelp_nwce10/helpdata/en/46/917a26cf75581ce10000000a1553f7/frameset.htm
    My question is why the WSDL less of <?xml version="1.0"?>. Is it a bug of NW, or I did something wrong when I created the WS?
    Thanks & Regards

    Hi Glen,
    Interesting Find.
    There are two very interesting things to note:
    1. The WSDL URL : http://localhost:50000/HelloService/HelloBean?wsdl
    Plz. note the "?" in the url. This kind of approach is mostly used to pass parametres to servlets.
    2. The Following is the HTTP Log of the Service call.
    POST /HelloService/HelloBean HTTP/1.1          // Pst method call confirms finding no 1
    Host: localhost:50000
    Content-Type: text/xml; charset=utf-8
    Connection: close
    Content-Length: 368
    SOAPAction: ""
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><yq1:sayHello xmlns:yq1='http://sap.com/tutorial/helloworld/'><name>Gaurav Modgil</name></yq1:sayHello></SOAP-ENV:Body></SOAP-ENV:Envelope>
    It seems that the server is using some Java App/servlet to read the Application Program and produse the result as XML, So maybe the strict adherence to XML was not required in this case.
    Note the Last Line where the version information is also passed along with other parametres.
    The Result output is a generated XML given below.
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Body>
        <ns2:sayHelloResponse xmlns:ns2="http://sap.com/tutorial/helloworld/">
          <return>Hello, Gaurav Modgil.</return>
        </ns2:sayHelloResponse>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    So my Conclusion is "There is no bug in NW7.1 :)....."
    Hope you Agree
    Thanks and regards,
    Gaurav
    Edited by: Gaurav Modgil on May 15, 2008 4:52 PM

  • Insert Encoding tag into xml file. ?xml version="1.0"?

    I am using oracle 10g.
    I am using dbms_xmlgen.getxml function to generate xml data for oracle tables. I use utl_file to write data back into xml file.
    Oracle is generating the file in the following manner...
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <RSLT_ID>1</RSLT_ID>
    </ROW>
    </ROWSET>
    I want to change the following xml header to have encoding information in it as follows...
    <?xml version="1.0" encoding = "AL32UTF8"?>
    How do I achieve that?
    Any suggestions?

    I want to change the following xml header to have encoding informationIn 10g I think you could use a xmlroot hack:
    SQL> select xmlroot(xmlelement(e, dummy), version '1.0" encoding="AL32UTF8') xml from dual
    XML                                                    
    <?xml version="1.0" encoding="AL32UTF8"?>              
    <E>X</E>                                               
    1 row selected.

  • Why ?xml version="1.0"?   in XHTML file

    I am new to jsf and I am struggling with an xml tag in the beginning of all my xhtml files. It appears before the doctype;
    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
    This is no problem with Firefox or Opera, but it messes up my site in IE. It goes into a so called quirks mode and uses old standards for CSS. Is it any way I can remove this tag? As I understand it doesn't have to be there to produce valid xhtml.
    I am extreamely happy for answers on this one.
    Jeanette

    Try using the XMLRoot function.
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb13gen.htm#sthref1566

  • How to change XML version in outbound XML file generated in XI

    Hi, I am getting following two records in the beginnning of my out bound XML file.
    <?xml version="1.0" encoding="utf-8" ?>
    <ns0:MT_WPUUMS01_Salesdata xmlns:ns0="http://ws-sapretail-pos.com/salesdata">
    Is there any control in XI to modify these two lines, in outbound files.
    Also, for inbound files, is there any way to process messages successfully, even if XML files from other systesm comes in different formats (xml version tag and nso tag lines)

    <?xml version="1.0" encoding="utf-8" ?>
    <ns0:MT_WPUUMS01_Salesdata xmlns:ns0="http://ws-sapretail-pos.com/salesdata">
    these two lines will be added when you create the  Message type name
    MT_WPUUMS01_Salesdata  is the message type name
    http://ws-sapretail-pos.com/salesdata"> is the name of your namespace......
    so if you want to chage these two lines in each XML build your MT and namespace accordingly.......
    even when you are importing the XML from o ther systems, you dnt have to worry about these tages as you import them in external definitation and select them only in message interface........should not be a problem if you import the XML from other systems
    whole conecpt is when you add these two lines it will convert the XSD to XML so when you have the XML form other system you only need to crer ate the WSDL out of it...
    let me know if i am not clear or if i understood your question wrong....

  • What web service & xml will be used for deleting the packged epub/pdf file from Admin Console

    What web service & xml will be used for deleting the packged epub/pdf file from Admin Console?
    I am able to delete the files from Admin console directy but not able to get which web service is calling on deleting the file from admin console:
    Mangal

    Hi Jim,
    I tired following web service and xml to delete the packaged ebook but it is giving me error instead of response:
    Web Service & XML
    http://myserver_url/admin/ManageResourceKey
    <request action="delete" auth="builtin" xmlns="http://ns.adobe.com/adept">
    <nonce>" . $nonce . "</nonce>
    <expiration>'. $expiration .'</expiration>
    <resourceKey>
    <resource>resource_id</resource>
    <resourceItem>1</resourceItem>
    </resourceKey>
    </request>
    Error Message
    <error xmlns="http://ns.adobe.com/adept"
    data="E_ADEPT_DATABASE http://myserver_url/admin/ManageResourceKey
    Cannot%20delete%20or%20update%20a%20parent%20row:%20a%20foreign%20key%20constraint%20fails %20(`adept`.`distributionrights`,%20CONSTRAINT%20`distributionrights_ibfk_2`%20FOREIGN%20K EY%20(`resourceid`)%20REFERENCES%20`resourcekey`%20(`resourceid`))"/>
    Magal Varshney

  • How to suppress ?xml version = '1.0'? in XML file generation thru PLSQL?

    Hi,
    I am using
    1. dbms_xmlgen.newContext to get the information from table.
    2. After that I am using dbms_lob.createtemporary
    3. Then I am using dbms_xmlgen.getXml
    4. Finally I am using dbms_xmlgen.closecontext
    I am using the above four steps to repatedly taking records from different tables.
    My requirement is : Each and every time I am getting the <?xml version = '1.0'?>.
    How to suppress <?xml version = '1.0'?> ?
    Regards
    Srini

    Hi,
    Use DBMS_XMLGEN.getXMLType to retrieve the XML data into an XMLType variable.
    Then, with getClobVal method, you can convert it to CLOB :
    SQL> DECLARE
      2    v_xml XMLType;
      3    v_lob CLOB;
      4  BEGIN
      5    v_xml := dbms_xmlgen.getXMLType('select * from scott.emp where rownum = 1');
      6    v_lob := v_xml.getClobVal();
      7 
      8    dbms_output.put_line(v_lob);
      9  END;
    10  /
    <ROWSET>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7902</MGR>
      <HIREDATE>17/12/80</HIREDATE>
      <SAL>800</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed

  • Issue in running a 9i version Page XML in 10g JDeveloper

    Hi
    In our 11i to R12 upgrade project we are trying to run our custom 9i version Page XMLs in 10g JDeveloper. We imported the JPR itself in 10g Jdeveloper and it did conversion while loading. But when we tried to run the pages we are getting
    java.lang.NullPointerException
         at oracle.apps.fnd.framework.webui.OASlideMenuUtil.prepareNavAndFavList(Unknown Source) error.
    We found out that it is because of the missing "Navigation and Favorites options" that comes along with R12 version pages. We confirmed it by creating a new page in 10g Jdev and copy pasted all the regions from the old page to the new page. It is working fine. Now the doubt i have is,
    Wont 10g Jdev take care of this during the conversion of the Page XMLs and Java files? Or am i missing any big part here.
    Tried searching with keywords, tags but dint help. Kindly refer if you have any links or thoughts.
    Thanks,
    Praveen.

    This can be caused by the 'Function Name' attribute on the page layout region being NULL but with the XML tag still in the page XML i.e.:
    <oa:pageLayout id="PageLayoutRN" amDefName="xxjlp.oracle.apps.fnd.por.econtent.server.EContentAM" windowTitle="Portal Guidance Documents" title="Portal Guidance Documents" controllerClass="xxjlp.oracle.apps.fnd.por.econtent.webui.GuidanceDocSumCO" function="">
    Check the page you are forwarding to either has a valid value for 'Function Name' or ensure that this tag is removed from the page XML by clicking the 'Set to default' button on the component pallet toolbar.
    This is normally caused when a value was added by the developer then removed by highlighting the value and hitting delete.  This action keeps the tag in the XML file.  You should use the 'Set to default' button which will remove the tag completely.

  • XML Validation: ignore non-XML-Header in XML-file(payload): any solutions?

    Dear Experts,
    after I finally managed to configure the XML Validation, we're facing the next problem:
    The payload of the XML files looks like that:
    Abcdef#ABCDEF
    AbcDef#123
    <?xml version="1.0" encoding="UTF-8"?><Document xmlns.....
    as you can see, there's a header which is necessary. The XML Validation works fine if the header is removed manually for testing. If the header is not removed, the validation is not possible ("Content is not allowed in prolog.")
    Is it possible to realise the validation WITH that header? Can I tell SAP PI to ignore the header? Or make any changes to the XSD file?
    Thanks alot!

    Hi Armin,
    Armin Kern wrote:
    > After leaving SAP PI, those 2 lines have to be in that exact place (before the XML part) for further processing. Just deleting it wouldn't be enought. Does the complex design you mentioned complay with this requirement?
    You can put it into the message instead of deleting. And rebuild the "header" in the second step. So you can fullfill the requirement. As mentioned before: The design is complex, this will lead later on to problems. Any change will be difficult, as another developer had to read a long documentation.
    An alternative would be to do all with one interface mapping (without validation):
    1. ABAP / Java mapping deleting the "header" (put it to memory)
    2. Messges Mapping 1:1 each field (will fail in case of wrong format and act as validator)
    3. ABAP / Java mapping restoring the header
    4. Alert will be raised in case of an error (to get the result of the validation)
    Armin Kern wrote:
    > I also thought about splitting the message, deleting those 2 rows in one of the messages, sending this one message to PI again, validate it and if it is correct, send the second message (without mapping) to the final destination. No idea if that is possible at all..
    As well possible. You would need a virtual receiver for the first message, which is sending back a response. For example a servlett, a proxy or a RFC module. In that design you put some logic to the sender, what is actually not bad. But if you do so, why you dont validate there as well (for example with Java)? It would make your design much easier..
    Regards,
    Udo

  • DB XML version 2.5.13, php 5.2.10

    Not sure what the problem is, but I'm not getting the XML content with this piece of code:
    function getXmlDocumentByNameAsStringV1($documentName, $containerName){
    $container = $this->mgr->openContainer($containerName);
    $xmlDocument = $container->getDocument($documentName);
    $xmlDocument->fetchAllData();
    $content = $xmlDocument->getContent();
    $documentName = $xmlDocument->getName();
    echo "doc name= [$documentName]";
    print $xmlDocument->getContent();
    unset ($container);
    return $content;
    I basically created a wrapper class around the DB XML api.
    I was trying to get the full XML content as a string with this function, but all I seem to get is just a reference.
    I ended up doing a query on it instead to get me the getContent() call to get what I needed (which was full XML document with the document version and DOCTYPE refernces), but was wondering what I was doing wrong with this approach.
    Also when I was inserting XML documents into the Oracle Berkely DB XML database that referenced a DTD the database seemed
    to switch to a validate mode even though I did not turn on validation when either creating the container or opening the container.
    Is there a way to overide what appears to be a valdiation mode when the document refernces a DTD?
    I am running PHP 5.2.10 under Apache 2.2.14 with the binary release of DB XML version 2.5.13
    I figured out that I had to put my DTD in the [Apache Root] directory for it to validate properly. Stuff I read
    through the forums suggested that I needed to put the DTD at the root of where the databases are when
    referencing a DTD with just a file name without any reference to file:/// etc.. or http://
    I changed my home directory to a certain location:when I instantiated the
    $env = new Db4Env();
    $env->open($this->homeDirectory, $this->flagsDbEnvOpen)
    In any case the work around for now is to just put the DTD in the location that it expects which is the Apache Root install directory.
    It is a minor inconvenience, but thought I would mention it for others that may have run into this problem.
    (I used the Process Monitor searching on my DTD name to discover the solution to where Oracle DB XML or rather Apache Web server, I suppose through the dlls
    was expecting to find it)
    Also it appears that the binary versino works with PHP 5.2.10 of apache. I did not need to recompile the code with the new apache version.
    Is there any thing I should be worried about?
    Also I was getting the following error:
    // the code commented out below was an attempt to try and do a sub query from a valid XmlValue object.
    // was unsuccesful. starting receiving errors such as
    ////[25-Nov-2009 15:24:26] PHP Fatal error: Uncaught exception 'xmlexception' with message 'Error: Sequence does not match type document-node() - found item of type element(APP_Test_Script, {http://www.w3.org/2001/XMLSchema}untyped) [err:XPTY0004], <query>:1:12' in C:\htdocs\app1\BackEnd.php:82
    // Will attempt to reprocess xml into a php DOm node and extract out value that way, just to get something working.
    // $subQuery = "//*";
    // $categoryQContext = $this->mgr->createQueryContext();
    // $categoryQuery = $this->mgr->prepare($subQuery, $categoryQContext);
    // $testScriptValue = $AppScriptAsXmlValue->asString();
    // echo $testScriptValue;
    // echo "hello world";
    // $categoryResults = $categoryQuery->execute($testScriptAsXmlValue, $categoryQContext);
    // $categoryValue = null;
    // while($categoryResults->hasNext()){
    // $node = $categoryResults->next();
    // $categoryValue = $node->asString();
    Basically, I was trying to do a sub xquery from an initial xquery that returned a sequence of XML documents. According to the example in book The Definiitive Guide to Bekrely DB XML
    it should have worked, but wasn't.
    I also ran into an issue where I seemed to have locked up a container when I was editing an XML document in Oxygen and saving it back to the DB XML container from within Oxygen.
    after that action it wouldn't return from the save function and I coudln't ever load up that container. Even trying to access the contain from the command line dbxml it wasn't able to access
    that container again. I ended up having to blow it away from lack of knowledge on how to recover from that. If anyone has run into this and/or has some suggestions on this it would be nice.
    I'm guessing could it be because I had some meta data values defined in some of these documents that I was updating. From Oxygen, can you create metadata? I dont think you can, at least it wasn't obvious to me except perhaps fro the name of the document (which is implicitly a meta data tag).

    Hi,
    You'll have to compile yourself for different PHP API versions.
    Regards,
    George

Maybe you are looking for