Open the xml file in a new tab with javascript??

Hello all,
I have given Denes Kubicek example on Export to xml files straight from Reports http://htmldb.oracle.com/pls/otn/f?p=31517:118:651492651950833::NO .
I am glad to say that with a few changes it also works on Interactive reports.
However i am trying to implement something different.
I wish to have the same feature but within an ajax request, i don't want to submit the page.
I already know how to fill in all the variables required.
the only problem is on how to return the file to download.
In your method as soon as the page submits you present the file to download.
I want to be able to do that but after an ajax request and not after a submit.
I am quite sure the problem is about http/header mime types.
I can return the whole xml into the javascript. I can even see it in an alert() or in the page with document.write(); but i haven't found a way on how to make it as a file download automatically.
Can anyone tell me how to solve this??
Regards Pedro.

about:config
set browser.search.openintab to true

Similar Messages

  • Error while opening the XML file

    Hi all,
    i'am trying to download data from internal table to XML file with root node and its
    corresponding child nodes.i have written the program in this way.
    tables: mara.
    include bcciixml_decl.
    include bcciixml_impl.
    parameters: p_matnr like mara-matnr.
    start-of-selection.
    data: piXML          type ref to if_ixml,
            pDocument      type ref to if_ixml_document,
            pStreamFactory type ref to if_ixml_stream_factory,
            pIStream       type ref to if_ixml_istream,
            pParser        type ref to if_ixml_parser,
            pNode          type ref to if_ixml_node,
            pText          type ref to if_ixml_text,
            string         type string,
            count          type i,
            index          type i,
            totalSize      type i,
            dsn(40)        type C,
            xstr           type xstring.
      types: begin of it_mara,
                matnr like mara-matnr,
                ernam like mara-ernam,
                aenam like mara-aenam,
                vpsta like mara-vpsta,
            end of it_mara.
    data: itab_mara type table of it_mara.
    select matnr ernam aenam vpsta from mara into table itab_mara where
           matnr =  p_matnr.
    types: begin of xml_line,
            data(256) type X,
          end of xml_line.
    data: xml_table type table of xml_line.
    parameters: filename like rlgrap-filename.
    pixml = cl_ixml=>create( ).
    *-- create the initial document
      pDocument = pixml->create_document( ).
      pStreamFactory = pixml->create_stream_factory( ).
    *-- create an input stream for the table
    *pIStream = pStreamFactory->create_istream_itable( table = xml_table
                                                     size  = totalSize ).
      pParser = piXML->create_parser( stream_factory = pStreamFactory
                                      istream        = pIStream
                                      document       = pDocument ).
    data: pOStream type ref to if_ixml_ostream.
    pOStream = pStreamFactory->create_ostream_itable( table = xml_table ).
    call method pDocument->render( ostream   = pOStream ).
    *-- how many bytes were written to the table?
    totalSize = pOStream->get_num_written_raw( ).
    *-- write the XML document back to the frontend
    concatenate filename '.out' into filename.
    condense filename no-gaps.
    CALL FUNCTION 'WS_DOWNLOAD'
         EXPORTING
              BIN_FILESIZE            = totalSize
              FILENAME                = filename
              FILETYPE                = 'BIN'
         TABLES
              DATA_TAB                = itab_mara
         EXCEPTIONS
              OTHERS                  = 11
    IF SY-SUBRC <> 0.
    ENDIF.
    *-- print the whole DOM tree as a list...
    pNode = pDocument.
    perform print_node using pNode.
          FORM print_node                                               *
    form print_node using value(pNode) type ref to if_ixml_node.
      data: indent      type i.
      data: pText       type ref to if_ixml_text.
      data: string      type string.
      indent  = pNode->get_height( ) * 2.
      case pnode->get_type( ).
        when if_ixml_node=>co_node_element.
          string = pNode->get_name( ).
          write: at /indent '<', string, '> '.
        when if_ixml_node=>co_node_text.
           pText ?= pNode->query_interface( ixml_iid_text ).
           if pText->ws_only( ) is initial.
            string = pNode->get_value( ).
            write: at /indent string.
           endif.
      endcase.
      pNode = pNode->get_first_child( ).
      while not pNode is initial.
         perform print_node using pNode.
         pNode = pNode->get_next( ).
      endwhile.
    endform.
    but when open the XML file which i created on the desktop it shows the following error.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'file:///C:/Documents and Settings/anilda/Desktop/sim...
    how to rectify this error.
    Regards,
    satish.

    You are going to need to provide more details about this shell script file you are executing and the environment it is in. Beyond being on a Windows box, you have provided none of those details.
    If the SQL statement will execute cleanly in SQLDeveloper but not your script, then the issue lies in the script. How do you know the error is that SQL statement? Can your script even "select * from dual;" successfully?
    Also, SQLDeveloper (which I don't use) may contain its own libraries for accessing the DB. You probably should consider upgrading to a SQL*Plus client that is at least the same version or later as your database.
    Note:
    As I recall, xmlgen in 9.2 is now a synonym for dbms_xmlgen. You should change the package name accordingly [url http://docs.oracle.com/cd/B10501_01/appdev.920/a96612/d_xmlge2.htm#1010709]dbms_xmlgen.getXML

  • I can't open the RAW files from my new Nikon D4s camera in photoshop? How do I download the latest software for RAW files?

    I can't open the RAW files from my new Nikon D4s camera in photoshop? How do I download the latest software for RAW files? Cheers!

    What version of Photoshop are you running?  You will need at CS5, CS6, CC or CC2014.  Each version needs a different ACR-plug-in to open files from that camera.
    If you are on CS4 or earlier, you'll need to upgrade—or, in the alternative; look for, download, instal, launch and run the free, stand-alone DNG Converter 8.6 on each file of raw NEF files to convert them to raw DNGs first so you can open them in your version of Photoshop and ACR plug-in higher than 2.4.

  • Aperture refuse to open the RAW files from my new Nikon D7100.

    Aperture refuse to open the RAW files from my new Nikon D7100. What can I do? Thanks for help!

    the raw support of new cameras will be made with a Digital Camera RAW Compatibility Update not with a aperture update. But when the new RAW- Update will arrive is not sure.
    And that usually can only be installed with newer Aperture versions. You cannot use the latest raw support with Aperture 3.2.4, unless you are able to update to Aperture 3.4. And earlier raw support versions cannot be used with Aperture 2.
    See the footnotes on the Raw Support page  http://www.apple.com/aperture/specs/raw.html. That is why asked for the Aperture version.
    ** Requires Aperture 3 or later.
    *** Requires Aperture 3.4 or later.

  • I have Photoshop CS5 and a Nikon D 810 camera.  I have downloaded Camera Raw 8.8 & DNG converter.  I can neither open the raw files (.nef), nor process them with the DNG converter. What is going wrong?

    I have Photoshop CS5 and a Nikon D 810 camera.  I have downloaded Camera Raw 8.8 & DNG converter.  I can neither open the raw files (.nef), nor process them with the DNG converter. What is going wrong?  Thanks!

    This is the last paragraph from my very first response to you, post #1 in this thread:
    …Additionally, you need to install the DNG Converter, not just "download" it, and you need to launch it and run it on each folder of NEFs you wish to convert to raw DNGs.  [emphasis added]

  • Unable to open the XML files in Nakisa

    Hi Gurus,
    We are unable to open certain XML files in Nakisa. They show up as encrypted in the notepad or fail to open using the XML Marker. The files in question are
    AppResources.xml
    LoginConfiguration_SAP_Standard
    LoginConfiguration_Anonymous
    Purpose: We want to enable the SSO with the portal . We have checked the radio button but nakisa does not recognize the SSO ticket from the portal (Any folder in Nakisa where we need to place the Portal ticket?)
    Also we want Nakisa to show the org chart for the logged in user. Luke had mentioned that some changes need to be made in the AppResources.xml (hope i correctly remember this) and we were looking to make these changes (rather try out.. any pointers please..?)
    Thanks and Regards,
    Arun E V

    Hi Arun,
    These files are encrypted. If your organisation is a partner with Nakisa you can obtain the decrypter from them.
    Portal SSO works without any configuration directly in the XML files. If you are getting an error stating that the Portal ticket cannot be interpreted then your configuration is not correct. In your URL iView you need to ensure the fully qualified domain name (FQDN) is used for the application URL. In the Administrator Console you need to ensure you enter the system details (Host, Sys Nr and Client) for the backend system which holds your SSO ticket for that Portal. You need to use FQDN here too.
    There is additional security configuration that can be done in the XML files but SSO will still work with just the Administrator Console configuration.
    I hope that helps!
    Luke

  • Firefox STILL does not open the home page when a new tab is selected

    I have just 'upgraded' to FF4 and expected that the irritating 'new tab homepage load situation' would have been resolved by now: sadly, it looks to STILL be around.
    MS IE has been loading the homepage DIRECTLY when a new tab is selected for about FOUR YEARS now, so I'm staggered that such a simple but very useful feature is not available in Firefox.
    The obvious question is WHY??
    In IE, you don't have to keep hitting the home page button to carry out a search in google when a new tab is selected, and IE does NOT need an 'add-on' to incorporate this functionality; it really is quite irritating that the function is still not built-in to FF, and the coding requiret to incorporate the function ain't rocked science Mozilla people - WHY has this not been put into effect by now?

    Some people prefer a blank tab because it takes no time to load. Some people prefer their home page. Some people prefer a list of most frequently used sites. It would be convenient if all of these options were built in, but obviously no one stepped up and made it a priority.
    By the way, another way to search in a new tab is: Using the search box (on the toolbar), after typing your query, either press Alt+Enter or Ctrl+click the magnifying glass. This opens the search in a new tab and saves that step.

  • How to Open Adobe *pdf Files Hyperlink in New Tab

    (Amongst all the extensions I have installed are Session Manager and Tabs Mix Plus, either of which might have bearing on this question. Session Manager is set to restore the tabs still open upon closing the previous session.)
    When Firefox is closed, clicking a web hyperlink in a pdf file opened in Adobe Acrobat will open the browser, but that page will displace whatever was visible in the last session's focused tab (the one which would have focus if the browser was reopened normally).
    If Firefox is already open and I'm using Acrobat externally the same happens -- the hyperlink' s page opens in the tab with focus, displacing whatever other webpage is displayed theree.
    If by chance a pdf is open in a browser tab (FF is configured to open pdfs in a tab from *within* the browser) clicking a hyperlink in that pdf will open the new site in that current tab.
    What do I set to get external Acrobat to open in a *new* tab when clicking a webpage hyperlink in a pdf?
    == This happened ==
    Every time Firefox opened

    Check your browser preferences.
    ex Safari>Preferences>General>

  • I have updated my PSE9 and still can not open the RAW files from my new camera, I get an error?

    I bought a new camera (Canon T5i) and took photos in RAW, tried to open them in PSE9 and they wouldn't open. I got the following error...
    Canon RAW Codec found a new CR2 file that is not supported by the installed version.
    You can download the Canon RAW Codec update program from the link below.
    (Canon Server)
    I have been to the link & downloaded what update it had. I have also done the available updates on my PSE9 and I am still getting this error messge. When I called Canon regarding this they said I needed to contact Adobe.
    Can someone please tell me what I am doing wrong or not doing so I can open these files???

    The T5 is supported by Camera RAW 8.4 which needs PSE12. You can use the Canon software to convert RAW to TIF or the Adobe DNG Converter. The converter will convert the CR2 files to Adobes RAW DNG format that will open in PSE9's RAW processor. http://www.adobe.com/uk/products/photoshop/extend.displayTab2.html#downloads.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Is there a keyboard shortcut to open the previous page in a new tab that is right next to the current tab?

    Let's say I'm currently on page X, and the previous page I came from was page Y. Is there a keyboard shortcut to open page Y in a new tab right next to the tab with page X?
    Currently my only solution is to hold down cmd (for mac) and click the back arrow button, but again, I'm looking for a keyboard shortcut. I know CTRL + T opens up the same page in a tab right next to the current one, but I have to wait for it to load then press backspace to go back one page.

    Hello marsfoxbeta, command + shift + T
    [https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#os=mac&browser=fx22 Keyboard shortcuts - Perform common Firefox tasks quickly]
    thank you

  • How to make Firefox open the search results in a new tab instead of on top of already opened page?

    When I do the search through the search window on the top right corner, the search results open on top of the page I'm viewing at that moment, instead of in a new tab, so I have to keep remembering to open a new tab before each search. How do I change this, that the results would open up in a new tab?

    about:config
    set browser.search.openintab to true

  • I can't open the RAW files from my new Nikon D610 in PSE10. Any help for this?

    I recently purchased a Nikon D610.  I have PSE 10.  I can't open my RAW files now and I always shoot in RAW.  I've tried everything, but still can't open m,y files in the RAW format.  Any help??????

    Your most direct choices are:
    1)      Use the free Adobe DNG Converter 8.3 to create Adobe-DNG raws from your Nikon D610 NEF raws.  These DNGs will open in your older Elements Camera Raw plug-in.  Be sure to set the ACR compatibly options in the DNGC to support whatever version of ACR you’re using.
    2)      Buy PSE12, and first download the trial version to make sure your computer can run it properly.
    Adobe only adds new camera support to whatever the current versions of their software, and PSE12 was the current version of Elements when the D610 support was added.   PSE10 won’t be updated.
    Also be sure that you are NOT using the old Nikon Transfer or ViewNX with your new Nikon camera.  These older versions of Nikon products change something in the metadata of new camera NEFs that makes them unrecognizable to Adobe software.

  • Reading the XML file and displaying teh string with teh desired output

    Hi Gurus,
    I have an xml file as below.
    catalog>
    <book>
    <id>101</id>
    <genre>Computer</genre>
    <author>Jim Cortez</author>
    <title>XML for dummies</title>
    <price>44.95</price>
    <description>An in-depth look at creating mashed potatoes
    with XML.</description>
    </book>
    <book>
    <id>102</id>
    <author>George Bush</author>
    <title>I'm the decider</title>
    <genre>Fantasy</genre>
    <price>0.95</price>
    <description>I like milk and cookies.</description>
    </book>
    </catalog>
    I would like to display the Output as
    [<catalog>:1]
    [<book>:1]
    [<id>:1]
    [101:3]
    [</id>:2]
    [<genre>:1]
    [Computer:3]
    [</genre>:2]
    [<author>:1]
    [Jim Cortez:3]
    [</author>:2]
    [<title>:1]
    [XML for dummies:3]
    ............ etc., etc.,,
    here is the code template.......
    import java.io.*;
    class TagScanner implements TokenStream {
    public static final int BEGIN_TAG_TYPE = 1;
    public static final int END_TAG_TYPE = 2;
    public static final int TEXT_TYPE = 3;
    protected Reader reader = null;
    /** Lookahead char */
    protected char c;
    /** Text of currently matched token */
    protected StringBuffer text = new StringBuffer(100);
    public TagScanner(Reader reader) throws IOException {
    this.reader = reader;
    nextChar();
    protected void nextChar() throws IOException {
    c = (char)reader.read();
    public Token nextToken() throws IOException {
         if ( start of a tag ) {
         // scarf until end of tag
         // type is either BEGIN_TAG_TYPE or END_TAG_TYPE
         if ( end of file ) {
         type = Token.EOF_TYPE;
         text = "end-of-file";
         else {
         // scarf until start of a tag
         type = TEXT_TYPE;
         if ( just whitespace ) {
         // ignore and get another token
    return new Token(type, text.toString());
    Can someone please provide me the logic for the code please........... here is the complete link of the excersie http://www.antlr.org/wiki/display/CS652/Lexer+for+XML
    Many Thanks
    -M

    Can someone please provide me the logic for the code please..........The logic is pretty well spelled out for you in the description of the assignment and the outline for the code you provided. If you mean
    Can someone please do my homework for me....The answer to that is usually yes, someone can do your homework for you, but no, they usually won't actually do it for you.
    However, if you are really stuck on what to do, you should consider:
            if ( start of a tag ) {How would you know that you are at the start of a tag? Once you can answer that, the rest sort of works itself out as long as
                // scarf until end of tagyou realize what it means to 'scarf' and how to determine when an end-of-tag is reached (hint, very similar as to how to determine if you are at the start-of-tag).

  • I need to open up the same web site in two separate tabs. Since I upgraded to Firefox 6 when I try to open the web page in a new tab from the list in the drop down in the address window it only gives be the option to switch to the tab already have open.

    When I go the drop down from the address window, rather than showing the URL of the website I want open in a second tab it says "Switch to tab." But I don't want to switch to the tab - I want to open a second tab on the same URL. If I want to open it a second time I have to manually key in the address. Is there some way to turn this off so I can open up the second tab using the same address from the drop down? I have always been able to do this with previous versions of Firefox.

    '''''"Is there some way to turn this off so I can open up the second tab using the same address from the drop down?"'''''
    You can install this Add-on: https://addons.mozilla.org/en-US/firefox/addon/switch-to-tab-no-more/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Opening PC CS4 files using my new Mac with CS5

    I finally switched over to a MacBook Pro, and purchased CS5 Master Suite for the Mac as well. However, I have been running CS4 on my PC for the last few years and have 1000's of files that were created in this format.
    However, when I try to open these files created in Fireworks CS4 on my new software and machine, it will not let me do so.
    Are there any steps or actions that I need to take to make these viewable and editable in CS5 Mac?
    Please advise.....

    I've not experienced this problem. Were the files ever opened and saved within Photoshop? Can you currently open one/any of the files in CS4 with no problems?

Maybe you are looking for