Remove xml first line from generated VO xml

I'm combining multiple xml file to generate report using BIPublisher. I generated xml based off of a VO using VO.writeXML. How do I remove first row (<?xml version="1.0"?>) in the xml?

use Transformer and set setOutputProperty to omit first line.
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
Edited by: Puthanampatti on Dec 6, 2012 6:42 PM

Similar Messages

  • Need help with java File IO ( Removing the first line from a file )

    Hi guys ,
    I am currently doing a project in which I need to extract out the values from the second line of a file to the end. The question is how do I ignore the first line ??
    I thought of two possible answers myself. One is to use randomaccessfile to read and rewrite. But the file may be HUGE so storing the whole file in memory is not a very good idea.
    Second is to jump to second line before doing while ((str = in.readLine()) != EOL) ... or just delete the first line from the file. Can anyone suggest a better solution or show me some sample codes ? Thanks.
    regards
    billyam

    Just skip the first line (bufferedReader.readLine()), add a comment, and then handle the rest of your file

  • How to remove end of line from string?

    Hello,
    I'd like to remove ends of line from the string. I've tried:
        static final Pattern END_LINE_PATTERN = Pattern.compile("$+");
        strBuf.append(input);
        Matcher m = END_LINE_PATTERN.matcher(input);
        int startIndex = -1;
        int endIndex;
        while (m.find()) {
         startIndex = m.start();
         endIndex = m.end();
         if (endIndex == strBuf.length() - 1) break;
        if (startIndex > -1) {
         strBuf.setLength(startIndex);
        }For strings "hello\n" and "hello\r" it works properly, but for string "hello\n\n" I get first occurrence at index 6 (at second \n), so as the result I get "hello\n". For the string "hello\r\n" I get first occurrence at index 5 (it's OK), but the end index is 5 as well, and the next occurrence I get at index 7, which doesn't give me any sense.
    Hope somebody can help me.
    Agata

    What you're trying to do is remove one or more line separators from the end of a string ("\n", "\r", and "\r\n" each count as one line separator, but "\n\n" is two line separators). This is all you need to do: str = str.replaceAll("[\r\n]+$", ""); "$" doesn't match any characters, line separators or otherwise; it matches the position at the end of the string. In MULTILINE mode, it also matches the position before a line separator, but it still doesn't match the separator itself.

  • How to remove the first number from a queue?

    Hi,
    I am trying to implement the following code for a queue. I've made an attempt on the RemoveFromQueue method, but it doesn't seem to work. How would i correctly be able the method for it to be able to remove the first number from the queue? thanks.
      if (q.QueueIsEmpty())
            System.out.println("Queue empty");
      else
             int firstEntry = q.RemoveFromQueue();     
                  System.out.println("Integer extracted  : "  + firstEntry);
    int RemoveFromQueue ()
             if (QueueIsEmpty())
                   return false;
             else
                  for(i=1; i <= total; i++)
                        Queue[i-1] = Queue;
                         total--;
                         return -1;
    }

    int RemoveFromQueue ()
    if (QueueIsEmpty())
    return false;
         else
         for(i=1; i <= total; i++)
         Queue[i-1] = Queue;
         total--;
         return -1;
    }Here we go:
    1) if the queue is empty you attempt to return 'false' while the method itself is
    supposed to return an int.
    2) you attempt to assign an entire queue to a single queue element.
    3) your indentation is a mess.
    4) why do you test for an empty queue outside of that method?
    5) use pencil and paper and scribble down exactly what you want to do.
    6) don't use initial uppercase letters for method names.
    kind regards,
    Jos

  • Applescript to remove first line from CSV

    Hi,
    I receive CSV files that I then drag and drop into a Numbers spreadsheet.
    The CSV files have two lines of data (which correspond to two rows of data in a Numbers spreadsheet).
    The first line in each CSV is a header that I would like to delete before it goes into the spreadsheet.
    I would like to write an Applescript (application) that I could drop the CSV onto, that would delete the first (header) line.
    Seems like this should be simple, but I've spent the past hour searching for how to do this and I haven't found a clear answer anywhere.
    If anybody could help I'd really appreciate it.
    thanks.

    Saved as an Applescript App, this will delete the first line of text files dropped on the App
    USE WITH CAUTION and Test
    on open the_Files
         repeat with i in the_Files
              tell application "Finder"
                   if name extension of i is "csv" then
                        do shell script "sed  -i \"\" '1 d' " & quoted form of POSIX path of i
                   end if
              end tell
         end repeat
    end open

  • MQSeries---to remove the first message from queue

    Hi all,
    I have some question in MQSeries in Sun Solaris.
    I would like to ask if there are any command in runmqsc that can remove the first message only? I know the command 'CLEAR QLOCAL' but it removes all the messages inside the queue but not only the first one.
    Thanks a lot.
    Jane.

    You might have more luck with pure MQSeries questions on www.mqseries.net

  • First line from serial port, partial or junk data

    I'm trying to receive the following protocol which works, except I have to insert the equipment while the serial port is sending data.  So sometimes the first line is partial data and that causes errors down the line.    My thought was to wait to receive data until I receive the &&\r\n0108.  Any suggestion or code to implement that would be great. 
    Here is a couple of sample packets:
    &&\r\n
    0108136.19\r\n
    0110146.19\r\n
    01130.35\r\n
    012350.00\r\n
    !!\r\n
    &&\r\n
    2350155.19\r\n
    !!\r\n
    TIA,
    Jerry
    Attachments:
    Read_and_Parse_Data.vi ‏22 KB
    Strip_data.vi ‏12 KB

    Hey Raptor50,
    I would recommend using a queue to take in the data and then build an array and then trigger some event to start off of the &&/r/n0108 after this line is found you can proceed normally withou any lose of data.
    These may help:
    http://decibel.ni.com/content/docs/DOC-15453
    http://decibel.ni.com/content/docs/DOC-8653
    Sam S
    Applications Engineer
    National Instruments

  • How to remove the black line from a stacked canvas at run time???

    Hi All,
    I've developed a stacked canvas within a content canvas, when I run the form the stacked canvas apeared with a black line takes it.
    How to remove this line or how to disappear this line at run time??
    I tried to do this by putting (no line) in tools palette to the line color tool after selecting the black line one and after selecting the stacked canvas another once, but this did not resolve the problem!
    I need something else:
    I put the stacked canvas at detail data block and it didn't appear since I execute query in master data block
    How to appear the stacked canvas directly before executing query in master data block???

    Hi,
    u mean the border line? In stacked canvas property, select contour/outline and set it to none.
    Make sure, the stacked canvas is behind the content canvas in the objectnavigator. Then check your
    properties of the stacked canvas:
    - Position on content canvas
    - size
    - size of clipping
    Set stacked canvas property automatic visible to yes.
    Make sure the stacked canvas is not overlayed by other stacked canvas or items.
    Attackwave

  • Removing the side lines from forms window

    Hi,
    I am running forms 11g.
    When I run the forms, a rectangle window gets created in which there is canvas.
    The window shows side lines (so that we can see the shape of the window).
    Is there anyway to hide/remove those lines as they dont look too good in browser based app.
    Thanks
    Munish

    Well, I suspect there won't be any easy way to hide the window frame. Every window has a visible boarder. It may be possible to write a pjc that can override the coloring of the frame, but unfortunately I have no example of how to do this. Another option might be to use an inline frame (iframe) to display the entire form. Basically, you would create an html file which includes an iframe and the source of that frame will be your form. Create the frame slightly smaller than the form. Make the form's window not movable (in the Builder). It might also be necessary to set the form's window X/Y position to a negative value, for example -2. This would cause the left and top side to fall behind the iframe. The bottom and right side will be covered by the fact that the iframe is smaller than the form. So, the html part might be something like this:
    <p align="center">
    <iframe src="http://server:8888/forms/frmservlet?form=myForm" frameborder="0" scrolling="no" height="598" width="798"></iframe>
    </p>

  • I want to remove the DOC line from the SQL+ window, how to do?

    Hi there,
    Every time i execute the .sql file from he SQL window it displays all the documentation part of the file. This displays with the prompt tag DOC>.
    I dont want this documentation to display on to the window. How do i do this?

    select * from A;
    Note:
    this is select statement, it retreives the data from table
    A
    I dont want that note to be displayed to screen.
    SQL> @e:\scripts\sql\test_doc
    SQL> select * from dual;
    D
    X
    SQL>
    SQL> /*
    SQL> Note:
    SQL> this is select statement, it retreives the data from table DUAL
    SQL> */
    SQL>
    SQL> set echo off
    SQL> @e:\scripts\sql\test_doc
    D
    X
    SQL> Nicolas.
    Message was edited by:
    N. Gasparotto

  • Remove forwarding vertical lines from email

    I want to forward a brochure that is in my mail box to potential new customers, but I always have those colorful vertical bands to the left of test showing that it is being forwarded, is there a way to remove these to make my brochure look more professional?

    Have you tried selecting Message | Send Again? This should work after you've corrected the "To" address.

  • Removing first line in text file... Memory and HD concern

    Hello all,
    I want to remove the first line of a text file. This is easy... One way
    to do it, is to find the first "end of line" caracter, strip the string
    and re-write the sting in file with the "strip to sreadsheet" VI.
    Since the file can be quite large (about 120000 lines), is this a good
    way to do it. Will it re-write all the line or just moving the "begin
    of file" pointer to the second line? If it re-write the whole file,
    this option is not very good since I could have to do this operation
    quite often. (I want the file to be a kind of circular buffer / backup).
    What do you think is the best way to do this?
    Thanks!
    Vincent

    I think you would have to read in all the data and write it to a new file, you could either keep the data in RAM or simply write to another file then delete the original, and then rename the temp one.  So obviously that is a lot of data and memory.
    My main question is are you trying to use a text file as a circular buffer?  If so can you tell us more about the data, ie is it strings of a constant length?  Does a user ever need to read the file or could we head binary?
    A solution would be to truly make the file a binary file, so you could actually seek through the file easier, and maybe make the first data chunk the location of the most recent write.  The obvious danger is then writing over existing data.  This solution is still risky because of the data writes.
    You may want to look at some of the other file formats like HWS which maintains a hierarchy of data for you so you can simply add and remove data from it.  However, a user will not be able to easily read it.

  • Remove blanco line from poplist

    Hi,
    How do I remove a blanc line from the poplist? I've first entered 4 items in the list item property of the poplist. The insert property is set to no, required is set to yes and initial value is '0'
    Now I want the last item to be removed:
    If I simply delete the list item and the value a blanc line appears when running.
    I've also used 'ctrl + <'. This removes the item but when trying to compile I receive an error because the blanco items under the line that I've deleted contains LIST38, LIST39, ... as value. This doesn't correspond with the max length of 1.
    Any idea?
    Thanks

    I've solved it.
    I've also deleted the last item that I actually didn't want to deleted and everything beneed it with ctrl + < and than add it the item again.
    Thanks for your time.
    Regards

  • Problem removing grid lines from prints in PhotoShop Elements 13

    I cannot remove faint grid lines from my prints in Photoshop Elements 13, even after I've turned off the grid overlay. How can I get these lines out? I'm desperate as I am writing a book and am stymied at this point. Help!

    John Maggot wrote:
    I cannot remove faint grid lines from my prints in Photoshop Elements 13, even after I've turned off the grid overlay. How can I get these lines out? I'm desperate as I am writing a book and am stymied at this point. Help!
    The grid does not print. There has to be another source for the visible grid lines on your prints. Suggest that you do the following:
    Make sure that your ink cartridges have plenty of ink
    Do a deep cleaning of your print head
    Align the cartridges as per instructions in the printer's manual
    Do a test print

  • Remove address line from Popup page

    I would like remove the address line from several popup pages I have. I know the best way to do this would be through a page template. However, I don't see where the address line would be in the template. Can someone please suggest how best to remove the address line?
    Thanks!
    -Reid

    Reid-
    Actually this is not done by templates, you can easily do that in the JS popup parameter "location" that shows/hides the location bar (where you enter URLs) as follows:
    window.open ("http://www.yourlink.com","window_title","menubar=0,resizable=1,width=350,height=250"); Hope this helps,
    Sam
    Please reward good answers by marking them correct or helpful!

Maybe you are looking for

  • App Store app nearly unusable on iPad 3 and iPhone 4 with iOS 6

    Thankfully I do not have any WiFi troubles with iOS 6 but I am facing another problem. iOS 6 offers that revamped App Store app which looks nice to me on my iPad 3 and iPhone 4, both using iOS 6. But it is nearly impossible to use that App Store app.

  • Condition that checks the value of an Item derived from a select list

    I want to conditionally display and hide items in a region based on a select list item. Some items will display when the select list is at the default (%null%) and others will be displayed when the select list user selects from the select list. The d

  • Custom Support Agreement updates/patches with SCUP

    I'm attempting to use SCUP to deploy Windows XP Service Pack 2 patches / updates that the company I support receives for paying for a CSA (Custom Support Agreement). Don't ask, I can't share the patches.  Sorry. Importing the CAB generates and "incom

  • Bose Companion 2 Series II

    Since I upgrade to OS 10.9.4, my Bose Companion 2 (Series II) external speakers have stopped working.  When I plug into the analog jack on the back of my Mac mini (2012) I get a buzzing sound through the speakers but that is it.  I check the Output i

  • What is Error 1418 or 14118?

    My Ipod 30GB Video died on Weds. and it came back to life on Sunday. Ever since Sunday, I have been trying to rstore it!!! BUT Itunes says, that an error occurred and request can not be completed. The error # is 1418 or 14118? Good thing I saved the