Add an extra line in the output xml file

Dear All
My scenarios is idoc to xml file.For the resultant xml file i have to append a line  <?Test Line?> after
<?xml version="1.0" encoding="UTF-8" ?>  while passing it to  legacy system ?
How generate such a xml file in xi?
Any help would be appreciated
Thanks and regards
uday

Dear All
my requirement is to generate an xml file which looks similar to
<?xml version="1.0" encoding="UTF-8"?>
<?TestLine?>
<test_mt>
<field1>123</field1>
<field2>234</field2>
</test_mt>
how to add <?TestLine?>  tag?
Hi shabrasish and rajashekar
i am new to java and xslt mapping can you guide me  or give me links which are similar to my requirement how to proceed with this kind of mapping
thanks
uday

Similar Messages

  • Junk Characters in the output XML file after Parsing

    Hi
    I am using DOM parser to parse an XML file.
    After parsing the input XML file, i am fetching some contents
    from the same and also putting the same contents in the parsed output file which is also an XML file.
    The problem here is that the after putting the contents to the output XML file from the input XML file,
    some junk character appears at the end of each and every tag in the outputfile.
    The junk character is some thing like this : " ampersand hash thirteen and a semicolon "
    (*THE MESSAGE DID NOT ACCEPT THE SYMBOLS KINDLY TRANSLATE THE ABOVE WORDINGS*
    INTO SYMBOLS)
    This character gets appended at the end of each and every tag in the output file due to which the output file
    is not recognised as an XML file.
    Please let me know as to why is this character appearing and also please suggest some solution
    for the same.
    -Thanks in Advance.
    Edited by: itskarthik on Oct 10, 2008 7:16 AM
    Edited by: itskarthik on Oct 10, 2008 7:18 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM

    Wierd.
    Try this piece of code. (You can always change it to use input file and output file instead of string if you want)
    What is your output?
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    public class XMLTest {
         public static void main(String[] args) throws Exception {
              String input = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" +
                                  "<test>\r\n" +
                                  "</test>";
              System.out.println("Input:");
              lookForCR(input);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              Document doc = factory.newDocumentBuilder().parse( new ByteArrayInputStream(input.getBytes()) );
              Source source = new DOMSource(doc);
              ByteArrayOutputStream bArrOut = new ByteArrayOutputStream();
              Result result = new StreamResult( new StripOutputStream( bArrOut ) );
              Transformer xformer = TransformerFactory.newInstance().newTransformer();
              xformer.transform(source, result);     
              System.out.println("\nResult:");
              lookForCR(bArrOut.toString());
              System.out.println("\nDone");
         public static void lookForCR(String input) throws Exception {
              char[] chars =input.toCharArray();
              for ( char chr : chars ) {
                   if (chr == 13 ) {
                        System.out.println("Has 0x0D character!!");
    class StripOutputStream extends OutputStream {
         OutputStream out = null;
         public StripOutputStream(OutputStream out) {
              this.out = out;
         @Override
         public void write(int b) throws IOException {
              if ( b != 13 )
                   out.write(b);
    }- Roy

  • Not receiving the output xml file from BPM

    Hello
    I am doing a scenario where I'd be sending two files in text format to the BPM workflow which would be using Fork and Correlation to merge these two files into one file and send the output xml file as receiver. Problem is that the two files are successfully converted into the xml messages and are displayed in SXMB_MONI but the output file which would be received from BPM engine as receiver is not being generated and displayed in SXMB_MONI as well as RWB. Please suggest any probable solution.
    Thanks.

    I don't think you can manipulate .ai files in Flex /
    AIR.

  • How to remove the extra space in the output pdf file?

    Hi All
    In our RTF layout template we have both static content and dynamic content.
    In RTF template we have used many if-else,choose,For each loops.
    On the account of that,In the output pdf file, we are getting lot of empty space in the place of that coding(if-else,choose,For each loops).
    Is there anyway to reduce the space in the output pdf file?
    Please suggest some ideas.
    Thanks in Advance.

    White space is NOT your friend!
    Make sure you don't have any unwanted whitespace between commands and especially tagged on the end of lines. Chain your commands together with no whitespace and let them wrap, do not enter carriage returns.
    Cheers,
    Dave

  • How  to add an extra field in the output of a predefined report

    Hi everybody,
    I have to add an extra  field  by name  "DAYS"(VTBFHAPO-ATAGE) in the output of a predefined report" RFTMBL01".
    please provide me the code and where to add in the predefined report

    Hi  Pasquale Isolato
    the predefined alv report name is "RFTMBL01" . If u r  with system  please check the code and the field name i have to add ids"DAYS'.
      if u are not with  system please reply me so that i will sen the code also
    Thanks in advance

  • JAXB duplicates database records in the output XML file

    I am trying to export a database through XML file using JAXB. But i get an XML file having my records with the @XMLElement name i gave it (SMS_Database) and also another one following it with <list/> as the RootElement name. I don't know where it's coming from. Here is the code:
    import java.io.*;
    import java.sql.*;
    import java.util.ArrayList;
    import javax.xml.bind.*;
    public class Parse2Xml {
      static final String XMLBASE = "./SMS_Database.xml";
      static ArrayList<Intermed> dataList = new ArrayList<Intermed>();
      static Connection con = null;
      static PreparedStatement ps = null;
      static ResultSet rs = null;
      public static void main(String[] args) throws JAXBException, IOException {
            con = getConnection();
            try{
              ps = con.prepareStatement("SELECT * FROM SMS_Log");
              rs = ps.executeQuery();
              while (rs.next()) {
                  dataList.add(getData(rs));
              rs.close();
              ps.close();
              con.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
            DataStore SMS_Database = new DataStore();
            SMS_Database.setList(dataList);
            JAXBContext context = JAXBContext.newInstance(DataStore.class);
         Marshaller m = context.createMarshaller();
         m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
         Writer w = null;
         try {
              w = new FileWriter(XMLBASE);
              m.marshal(SMS_Database, w);
         } finally {
              try {
                   w.close();
              } catch (Exception e) {
        static Connection getConnection(){
            String sqlURL = "jdbc:mysql://localhost:3306/SMSDB";
            String username = "SUNNYBEN";
            String password = "drowssap";
            try {
                try {
                    Class.forName("com.mysql.jdbc.Driver").newInstance();
                } catch (InstantiationException ex) {
                    ex.printStackTrace();
                } catch (IllegalAccessException ex) {
                    ex.printStackTrace();
            } catch (ClassNotFoundException ex) {
                ex.printStackTrace();
            try {
                con = DriverManager.getConnection(sqlURL, username, password);
            } catch (SQLException ex) {
               ex.printStackTrace();
            return con;
        static Intermed getData(ResultSet rs) throws SQLException {
                Intermed mediator = new Intermed();
                mediator.setSms_id(rs.getString("sms_id"));
                mediator.setSender_id(rs.getString("sender_id"));
                mediator.setMessage(rs.getString("message"));
                mediator.setPhone_no(rs.getString("phone_no"));
                mediator.setDate_sent(rs.getString("date_sent"));
                mediator.setSchedule_date(rs.getString("schedule_date"));
                mediator.setUsername(rs.getString("username"));
                mediator.setResponse(rs.getString("response"));
                return mediator;
    import java.util.ArrayList;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlRootElement;
    @XmlRootElement(namespace = "SMS_Database")
    class DataStore {
        @XmlElement(name = "SMS_Log")
        ArrayList<Intermed> dataList = new ArrayList<Intermed>();
        public ArrayList<Intermed> getList() {
            return dataList;
        public void setList(ArrayList<Intermed> dataList) {
            this.dataList = dataList;
    import javax.xml.bind.annotation.*;
    @XmlRootElement(name = "SMS_Log")
    @XmlType(propOrder = {"sms_id", "sender_id", "message", "phone_no", "date_sent", "schedule_date", "username", "response"})
    public class Intermed {
        private String sms_id;
        private String sender_id;
        private String message;
        private String phone_no;
        private String date_sent;
        private String schedule_date;
        private String username;
        private String response;
        public String getSms_id() {
            return sms_id;
        public void setSms_id(String sms_id) {
            this.sms_id = sms_id;
        public String getSender_id() {
            return sender_id;
        public void setSender_id(String sender_id) {
            this.sender_id = sender_id;
        public String getMessage() {
            return message;
        public void setMessage(String message) {
            this.message = message;
        public String getPhone_no() {
            return phone_no;
        public void setPhone_no(String phone_no) {
            this.phone_no = phone_no;
        public String getDate_sent() {
            return date_sent;
        public void setDate_sent(String date_sent) {
            this.date_sent = date_sent;
        public String getSchedule_date() {
            return schedule_date;
        public void setSchedule_date(String schedule_date) {
            this.schedule_date = schedule_date;
        public String getUsername() {
            return username;
        public void setUsername(String username) {
            this.username = username;
        public String getResponse() {
            return response;
        public void setResponse(String response) {
            this.response = response;
    }

    Dear All
    my requirement is to generate an xml file which looks similar to
    <?xml version="1.0" encoding="UTF-8"?>
    <?TestLine?>
    <test_mt>
    <field1>123</field1>
    <field2>234</field2>
    </test_mt>
    how to add <?TestLine?>  tag?
    Hi shabrasish and rajashekar
    i am new to java and xslt mapping can you guide me  or give me links which are similar to my requirement how to proceed with this kind of mapping
    thanks
    uday

  • Extra line at the end of file when transferred from XI to FTP.

    Hi All,
    Need help regarding the below query.
    I have an inbound structure with the below format
    MT_RAVE_L                     1..1 (is the main node)
          Logistic Info                 1..Unbounded (this is the structure under the main node)
                   LOGSOPTUN      1..1 (this is below Logistic Info field)
          File_Name                   1..1 ( This is also below main node with the same level of Logistic   Info structure)
    (Tried to insert a pic of the mapping but was unsuccesful)
    We are trying to move a file from XI to FTP. the file is being created in FTP succesfully but an extra blank line is being inserted at the end of the file.
    After lot of investigation we could trace the it is because of the File_Name field data is being not moved to inbound file.( Here we are using the File_Name field data for creating a file name in FTP. i.e., the File_Name is the File name under which our data is being stored in FTP and that is the reason we are not using File_Name in Content Conversion)
    Can you please suggest ways so that the empty line is not created.
    Thanks in advance
    LRK.

    Hello,
    Have you set the property in  File adapter lastFieldOptional.
    Thanks and Regards
    Hemant

  • Validating against schema file for the output XML file

    Hi,
      I am using XSLT for mapping. The output message is generated according to the mappings but it is not validate aganist schema of target . I am using xsd file from external defination section as target. Can any body help me in this regard.
    Thanks,
    Mallikarjun.M

    hi,
    if you talk about the schema of a target message type
    than validation only works if you use graphical
    message mapping
    not with: xslt,java, abap
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Choose encoding of the output XML FILE

    I use XSU to generate an XML file in PL/SQL using the getXML method but I don't know how to choose the encoding.
    Can somebody help me ?

    I use XSU to generate an XML file in PL/SQL using the getXML method but I don't know how to choose the encoding. Can somebody help me ? Using XSU you can set the Encoding Tag by:
    PROCEDURE setEncodingTag(ctxHdl IN ctxType, enc IN VARCHAR2 := DB_ENCODING);
    Do you have use case that you want to do the character set conversion?

  • How to remove namespace link from the output XML

    i have to remove 'xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions"' (namespace) from the output xml file which is generated from the BIP. I need my output XML file without that namespace link, this namespace link is coming for each element.
    Anybody know how to do that please help.
    output xml file
    <?xml version="1.0" encoding="UTF-8" ?>
    <Reports version="2.00">
    <deliveryNote xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <subjectId />
    </deliveryNote>
    <deliveredReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <referDate>[Delivery note->H4]</referDate>
    </deliveredReports>
    <simpleReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
    <numberOfReports>2</numberOfReports>
    <nReport>
    <reportName>Xyz</reportName>
    <reportVersion>1.0</reportVersion>
    <observations>
    <numberOfObservations>15</numberOfObservations>
    <columnObservation>
    <y>9</y>
    <rO>
    <x>14</x>
    <o>11</o>
    <o>21</o>
    <o>121</o>
    </rO>
    </columnObservation>
    </observations>
    </nReport>
    </simpleReports>
    </Reports>
    my xslt file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions" >
    <xsl:output method="xml" encoding="UTF-8"/>
    <xsl:template match="/">
         <xsl:element name="Reports">
              <xsl:attribute name="version">2.00</xsl:attribute>
                   <deliveryNote>
                        <subjectId></subjectId>
                        </deliveryNote>
                   <deliveredReports>
                        <referDate>[Delivery note->H4]</referDate>
                   </deliveredReports>
                   <simpleReports>
                        <numberOfReports>2</numberOfReports>
                        <nReport>
                                  <reportName>Xyz</reportName>
                                  <reportVersion>1.0</reportVersion>
                                       <observations>
                                       <numberOfObservations>15</numberOfObservations>
                                       <columnObservation>
                                            <y>9</y>
                                            <rO>
                                                 <x>14</x>
                                                      <xsl:for-each select="TEST_XML/LIST_R1/R1">
                                                           <o><xsl:value-of select="xdoxslt:lpad(COL1,10,' ')"/></o>
                                                      </xsl:for-each>
                                            </rO>
                                       </columnObservation>
                                       </observations>
                             </nReport>
                        </simpleReports>
              </xsl:element>
    </xsl:template>
    </xsl:stylesheet>

    Please post the same in BI Publisher forum
    BI Publisher
    Thanks,
    Vino

  • How to add extra lines in the address field?

    How, if possible, to add extra lines in the address field? For example, the street address might require two lines:
    Bob Smith
    Newport A  Unit 32
    Century Village
    Aventura, FL 

    Thanks, Barney! It's even easier than the solution I came to: copying and pasting into the field. 

  • Using `n how can i add two empty line (two carriage return), between these two lines in the output file?

    hi friends
    using `n   how can i add two empty line (two carriage return), between these two lines in the output file?
    PS C:\> $env:COMPUTERNAME | add-content c:\file.txt
    PS C:\> $Env:USERDOMAIN  | add-content c:\file.txt
     i tested "$env:computername`n`n`n$env:userdomain" | add-content c:\file.txt   but it results in 
    myPCMyDomain
    but i wanted the contents of the output file be like this:
    MyPC
    #empty line here 
    #empty line here
    MyDomain
     i tested many other forms but didn't work.
    thanks

    I tried it, as well. The line breaks were respected in the PowerShell console, Programmer's Notepad, and Word; they weren't in Notepad.
    You are using a Unicode file.  Locale is what?
    If you just want notepad compatible line breaks then do this:
    del file.txt ; "$env:computername`r`n`r`n`r`n$env:userdomain" | add-content file.txt ;notepad file.txt
    Look in hex to see that `n is ^L or 0xA and is only one character.  CrLf is 0xD 0xA - two characters.
    My programmers editors and VS all understand a single ^L as a line break so does PowerShell.  Only DOS/Notepad and other utilitis don't understand this..
    ¯\_(ツ)_/¯

  • Adding an extra line in the table control

    Hi All,
    How can we add an extra record in the table control after the user hits ADD button?We tried doing it by incrementing the lines field in the table control,but it is executing the PBO part again after hitting the ADD button.Any SAP standard program will be helpful.
    Thanks,
    Rakesh.

    Hi,
    I think you can do that by inerting new line to Internal table that used in your Table Control. Here the sample:
    TC_DATA = Your Table Control
    IT_DATA = Your Internal Table used for Table Control.
    In your MODULE USER_COMMAND INPUT, add this code:
    IF OK_CODE = 'ADD'.
      CLEAR: IT_DATA.
      APPEND IT_DATA.
    ENDIF.
    Regards,

  • Proxy output not displayed in the output XML

    Hi,
    I have created a web service and is calling the service using SOAP UI tool. To do it i have created an RFC Fm and inported to SAP PI and activated it with the input and output parameters that i need. When i am calling the service through the SOAP UI, in debugging( in the provider class of the service interface of the sproxy transaction ) i am able to see the values filled in one of the parameters but the same is not getting displayed in the output XML.(Response). Can any one please suggest what cud be the reason.
    Thanks

    Hi,
    can give us a hint? Code output, screenshot? btw I hope your service is a Synchronous service.
    Thanks Nick.

  • How to find end of the Page in Crystal ? or I need to add one Horizontal line at the end of the page.--- URGENT HELP NEEDED

    Hi friends,
    I need to add one horizontal line  for the detail section at the end of the page.
    I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming.
    Is there any feature to find end of the Page.
    I want report format like this.
    set id  |  set name |  date  Name
      1         x           dddd   vijay
                            dddd   sarathi
                            dddd    reddy
    (End of the page)
    Thanks in advance...
    vijay.

    Do you know how many detail records are showing up per page?
    If you do - you could create a Details B section that is suppressed except for on Record N (where N is a counter, and N is the last Detail record that will show up on a page).
    The Page footer is indeed built so that it will be rendered at the bottom of your physical page of paper.

Maybe you are looking for

  • Hide "Bank Details " option in Suppliers

    Hi everyone, we are re-implemented eBs 12.1.3 from 11.5.5 release and I have found a problem for migrating a customization done by us in previous release. This customization hided "Bank accounts" tabs (Header and Site in Supplier form) for any users

  • Error in launching Interaction Center

    Hi All, We have released transport requests from Development to quality box. when we try launching Web UI in quality box we are encountering dump saying" cannot display view CRM_UI_FRAME/WORKAREAVIEWSET of UI Component CRM_UI_FRAME. An exception occu

  • Scripting in templates

    Hello, we are migrating from version 11.1.1.3 to 11.1.2.3. A part of it is migrating to calc manager from HBR. Since we are used macros, the import of the generated xml from HBR resulted in BR's and associated templates. I have 2 questions for you gu

  • Thick Driver Vs Thin Driver

    Hello, Could you please tell me what is the difference between Thin Driver and Thick Driver? Which we should use? Is Type 1 and Type 2 Driver is Thick Driver? Please mention. This have any aricle, please give the URL Thank you. Thank you in Advance b

  • DCIteratorBinding : how to set the iterator value programatically,URGENT

    Hi all I have a af:selectOneChoice component bound to Iterator(DCIteratorBinding) I want to set the value of the af:selectOneChoice to specific value, I want to do so by setting the current row of the iterator to the value I want for example the iter