How can I access xml document from javascript whithin a JSP page

how can I access xml document from javascript whithin a JSP page?
I have a JSP that receives an XML document from a JavaBean, so I can access it within the entire JSP, but I need to access it from the javascript inside the JSP... and I have no idea how i can do this.
Thanks in advance!

The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

Similar Messages

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • How can we forward XML document from Routing Engine to Mapviwer!!!

    Does anyone try to forward XML document from routing engine to Mapviwer. Like spatial coordinate system from Routing engine. Could you help me how to accomplish this problem. Thank much much....

    Just open an HTTP connection to MapViewer's server url (ususally http://host:port/mapviewer/omserver) and send an XML map request to it using POST. You can do that from any language that supports such a connection.
    Inside the xml map request you can attach the routing result (a series of coordinates i imagine) as dynamic geo-features. You can also specify any base map/layer information in the xml map req provided you have defined such map/themes. DTD of mapviewer's map req is in the Users Guide, which is on OTN site mapviewer http://otn.oracle.com/products/mapviewer.

  • How can I access iCloud documents from my iPad and work on them on my iPad

    How can I access and work on documents in the cloud on my iPad, not a computer

    Thank you, I really appreciate your time, but I think I am after something the iPad won't do.  I don't want to use a computer at all. I would like to open an iCloud doc using my iPad, work on it (on the iPad), then print or save it back into pages or the iCloud. 
    From your responses, it sounds like you have to use an iPad in conjunction with a computer, of some description, to work on documents in the cloud, the iPad alone will not let you do this.
    So I guess the short answer is, I can't.
    Thanks for your time and input.

  • How to open a local file from javascript in a jsp-page

    Hi
    I have created an iview from a PAR file. In the par file I have a jsp-page with some javascript code. From the javascript coe I want to open a new window with an Excel file.
    I have tried window.open("c:
    test.xls", "test_window"), but it doesn't seem to work. I have created a small HTML page locally with the same command and there a new window opens with the Excel file.
    If I change the local file path with an URL it also works.
    Any idea how to open a local file ?
    Thanks
    /Jakob

    Jacob,
    I'm not 100% (but 99,9%) and it has to do with security ristrictions of the browser not allowing to have local workstation interation from the web. This is ofcourse very dangerous if the browser would allow it... So therfore it is blocked. What if somone would point to a file/executable that formats your drive so for that reason it is not allowed to have web interaction with a local file. Only with Java Applets this is possible but still with many limitations, and what I remember Google Gears and Adobe Air do have some limited web 2 local file interaction... So best and most simple solution you are left with is pointing to a url instead of a file on a c:\ drive.
    PS The reason why it works when you start the html from your local PC has todo with the fact that the browser detects that the html is not running in the web at that moment therefor allowing the access.
    Cheers,
    Benjamin Houttuin

  • How can I access my documents on iCloud from my iPad?

    How can I access my documents on iCloud from my iPad?

    It's as easy as ABC if you use clouds like Dropbox, Box.net, Sugarsync or Google Doc
    http://i1224.photobucket.com/albums/ee374/Diavonex/2f246602.jpg

  • How to create an XML document from a String.

    Can anyone help,
         In the Microsoft XML Document DOM there is a load function load(string) which will create an XML document, but now we are switching to Java and I do not know how to create and XML document from a string, this string �xml document� is passed to my program from a webservice and I need to read several xml elements form it in a web server.
    This string is a well formatted XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <Countries NumberOfRecords="1" LanguageID="en-us">
         <Country>
              <CountryCode>AU</CountryCode>
              <CountryName>AUSTRALIA</CountryName>
         </Country>
    </Countries>

    Thanks PC!
    I made it work using:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    factory.setIgnoringComments(true); // We want to ignore comments
    // Now use the factory to create a DOM parser
    DocumentBuilder parser = factory.newDocumentBuilder();
    //TransformThisStringBuffer is a string buffer wich contain the 'XML document (String)'
    InputStream in = new ByteArrayInputStream(TransformThisStringBuffer.toString().getBytes());
    // Parse the InputStream and build the document
    Document document = parser.parse(in);
    But which one is faster InputSource or InputStream, were would you put the "new InputSource(new StringReader(yourString))" in the above code?

  • How can I print a document from "workspace?"

    How can I print a document from "workspace?"

    1. Buy a AirPrint enabled printer; see list below
    http://support.apple.com/kb/ht4356
    2. Run the CD provided and setup as network printer; this will setup your printer to the same network as your iPad
    http://i1224.photobucket.com/albums/ee374/Diavonex/1a30ee42.jpg
    3. Start printing from your iPad without wire
    http://i1224.photobucket.com/albums/ee374/Diavonex/93ec77e5.jpg

  • How can I change a document from booklet to single pages

    How can I change a document from booklet to single pages?

    Very cumbersome.
    How many pages?
    Make a copy first.
    In Acrobat use the Crop tool to crop half the width. (Pages > Crop Pages.)
    For 11x17 to 8.5 x11  crop all even pages 8.5 left, all odd pages 8.5 right.
    Do you have InDesign?
    Create a new document correct to finished page size.
    (Use Import Multi Page script to) Place all pages offset by the proper page amount.
    Export new pdf.

  • How can i access the EJB from a Webdynpro

    Dear all,
    How can i access the ejb , from a webdynpro?.
    Is there any way to do that?.
    I want to write the entire code (business functions) within the EJB and i wan to access the entire methods from a WebDynpro Application.This is the situation.
    Please help me to , resolve this problem.(Here im using JDBC Connection .. etc.).
    I want to do the basic connection setting's and data retrieval part within the EJB and use that within the WebDynpro..
    how can i seperate this two(i mean, i want to seperate the JDBC connections and WebDynpro,i dont want to hard code any connection parameters within the webdynpro code)
    So that i want use that saet of particular function's in many webdynpro applications..
    (i dont need any help regarding webservice way.)
    If anyone can , please help me..
    I tried that javabean class , manifest file , that way (importing javabean model).
    but im getting errors.
    I cant properly utilize that..
    So please help me with steps regarding that,,
    for javabean
    and if any , for EJB also..
    with regards
    Kishor.G

    HI,
    Since webdynpros follows Model View Controller Architecture You can access EJBs in webdynpro(views/frontend) infact to connec to database uding JDBC you have to utilise EJB ( opening connection to database closing, and other Business functionality).See this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/web dynpro tutorial and sample applications.faq#q-7
    <b>How to access the Car Rental Web Service?</b>
    Regards,
    RK

  • Hi, I would like to know how can I recover a document from pages that I didn't save anytime and instead of clicking the button save I clicked the delete button at the end. Is there any way to recover it?

    Hi, I would like to know how can I recover a document from pages that I didn't save anytime and instead of saving the doc I clicked the delete button. Is there any way to recover it?

    Regardless of application, the first step that I take is to save and name the current document — even if it has no content yet. With Pages, this good habit enables autosave. As you add content, your document revision history is restorable via the File Revert To menu. The delete key has the same document foreboding as only teaching a pet raven to speak "Nevermore."

  • How to Create an XML document from XSQL servlet which follows a particular DTD struct

    how to Create an XML document from XSQL servlet which follows a particular DTD structure.Could anyone send me a sample code for this.

    You'll need to associate an XSLT transformation with your XSQL page that transforms the canonical result into your DTD-valid format.
    For example, given an XSQL page like:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="rss.xsl" ?>
    <xsql:query max-rows="3" connection="demo" xmlns:xsql="urn:oracle-xsql">
    select title,id,description,url,to_char(timestamp,'Mon DD') timestamp
    from site_entry
    order by id desc
    </xsql:query>and an "rss.xsl" stylesheet that looks like this:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" doctype-system="rss-0.91.dtd"/>
    <xsl:template match="/">
    <xsl:for-each select="ROWSET/ROW">
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    <xsl:for-each select="ITEM">
    <item>
    <title><xsl:value-of select="TITLE"/></title>
    <link><xsl:value-of select="URL"/></link>
    <description><xsl:value-of select="DESCRIPTION"/></description>
    </item>
    </xsl:for-each>
    </channel>
    </rss>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>You produce DTD-valid output against the rss-0.91.dtd DTD that looks like:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE rss SYSTEM "rss-0.91.dtd">
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>

  • How can I access video file from sd card on ipad2?

    How can I access video file from sd card on ipad2?

    Your iPad 2 will see the video if:
    It's in a DCIM folder on the top level of the card (which is how most cameras do it)
    It's name is 8 characters, no more, no less (CKDI9483 for example)
    It's a format that the iPad will play
    I've made mp4's of things, folderized them right and named them 'right' and can transfer them to my iPad, so you can use a computer to make the files conform to what the iPad will see.

  • How can I access iTunes media from my iPad to my time capsule

    How can I access iTunes media from my iPad to my time capsule with out a computer

    Really not suitable.. The TC is a dumb hard disk in a router.. it is not a media server..
    You can move your itunes library to the TC.. but if you do that.. one day the TC will die and take your library with it.. as well as giving slow response to every network device.. this is really not suitable.

  • How can I save my document from pages to a flash drive?

    How can I save my document from pages to a flash drive?

    Locate the file on your Mac, plug in the USB stick (the mac should prompt you to open it, or do this automatically), click and drag the file from the computer (wherever it's saved to) to the USB folder. That's just putting an already saved file there.
    To save it TO your USB stick, find it in the Save To diolog on the sidebar. Click it, then save it there.

Maybe you are looking for

  • How do I stop firefox from keeping my email and password online for facebook?

    how do I stop firefox from keeping my email and password online for facebook? == This happened == Every time Firefox opened == in the past week

  • Suggestion for a Video Monitor For FCP

    I am looking for a video monitor to use with FCP. The Sony PVM-14L2 13" has been recommended. Is anyone familiar with this monitor or do you have a monitor which is working well for you that you would recommend. 1) Should I be looking for anything ke

  • Adobe Bridge and Extension Manager missing products

    I installed Production Premium, yet Adobe Bridge will not preview After Effects Presets. When selecting Manage Extensions, the Adobe Extension Manager does not show After Effects as a product. How can I fix this?

  • New Tiger 10.4.6  installation Questions

    Just installed a new retail version of Tiger 10.4.6 today. I bought it from Apple. It's up and running and I'm using it now, but I have some questions and things I'm not sure about. When I bought the DVD the Apple rep told me it was not compatible wi

  • Soundbooth creates a gap in mp3 files

    I've listened to these original files over and over in Quicktime and iTunes and there is no gap. After opening in SB (CS4) there is now a gap and  a  repeating segment: http://96.0.181.107/soundbooth.jpg Playing and listening to the mp3 in SB, there