How to display transformed XML in flex? xslt processor w/o javascript?

I have a tree view with a list of links. upon clicking the links it will display its contents in an iFrame.
some of the links in my tree are, google.com, yahoo.com, and 2 xml files, 1 of which i have transfromed into html using xsl.
google, yahoo and the xml file which i have not transformed display successfully in the iFrame. however the xml which i have transformed does not display anything. is there another way to display html in flex? or is there a way to display a transformed xml to html in flex.
also is there another way to to use an xslt processor in flex without having to use javascript?

In jsp page set content type to text/xml
<%@ page contentType="text/xml" %>

Similar Messages

  • Transforming XML Data with XSLT in a servlet

    Trying to transform XML data using XSLT. The following code works fine outside of a servlet. But in a servlet it gives the following error :
    * Transformer Factory error
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Namespace not supported by SAXParser
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Namespace not supported by SAXParser
         at org.apache.xml.utils.DefaultErrorHandler.fatalError(DefaultErrorHandler.java:257)
         at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:813)
         at TransformationApp.XSLTTransformServlet.MyTransform(XSLTTransformServlet.java:79)
         at TransformationApp.XSLTTransformServlet.doGet(XSLTTransformServlet.java:39)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)
    Several articles hinted at setting the factory namespace attribute to TRUE. I have tried that but same results. Here is the code :
    static Document document;
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    //factory.setNamespaceAware(true);
    //factory.setValidating(true);
    try {
    File stylesheet = new File(argv[0]);
    File datafile = new File(argv[1]);
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse(datafile);
    // Use a Transformer for output
    TransformerFactory tFactory =
    TransformerFactory.newInstance();
    StreamSource stylesource = new StreamSource(stylesheet);
    Transformer transformer = tFactory.newTransformer(stylesource);
    DOMSource source = new DOMSource(document);
    StreamResult result = new StreamResult(System.out);
    transformer.transform(source, result);
    } catch (TransformerConfigurationException tce) {
    // Error generated by the parser
    System.out.println ("\n** Transformer Factory error");
    System.out.println(" " + tce.getMessage() );
    // Use the contained exception, if any
    Throwable x = tce;
    if (tce.getException() != null)
    x = tce.getException();
    x.printStackTrace();
    } catch (TransformerException te) {
    // Error generated by the parser
    System.out.println ("\n** Transformation error");
    System.out.println(" " + te.getMessage() );
    // Use the contained exception, if any
    Throwable x = te;
    if (te.getException() != null)
    x = te.getException();
    x.printStackTrace();
    } catch (SAXException sxe) {
    // Error generated by this application
    // (or a parser-initialization error)
    Exception x = sxe;
    if (sxe.getException() != null)
    x = sxe.getException();
    x.printStackTrace();
    } catch (ParserConfigurationException pce) {
    // Parser with specified options can't be built
    pce.printStackTrace();
    } catch (IOException ioe) {
    // I/O error
    ioe.printStackTrace();
    Any help would be greatly appreciated.

    I don't know that this is true, but i think the problem is the classpath.
    The runtime has his own parser. This parser is befor your xalan.lib in the classpath and the
    parser from the runntime don't support namespace.
    Try Tomcat 4.
    Regard Dietmar

  • How can I transform XML-DB to Relational DB?

    How can I transform XML-DB to Relational DB?
    I want to transform Oracle 9i XML-DB to Oracle 8i R-db
    please tell me how to do this .
    thank you

    hi
    good
    its idoc_xml or idoc_xml_transform
    go through the below link hope it ll help you to solve your problem
    Check with below link :
    Re: IDOCS_OUTPUT_IN_XML_FORMAT -- IDOCS_OUTPUT_TO_FILE
    Re: any function module to write-xml schema of a idoctype to an internal table
    /people/michal.krawczyk2/blog/2005/11/13/xi-how-to-check-your-idocs-on-a-web-page-from-sapgui -> this will help you
    thanks
    mrutyun^

  • How to display an XMl file in a webydynpro Application.

    Hi All,
    I am working with a webdynpro application where i have an xml file. when ever i run the webdynpro application it has to display that xml file in the browser instead of view. It would be appreciable if anyone give me some idea on how to start this application
              Thanks in advance
    Regards
    ravi

    HI Ravi,
    Insert a portalIFRame or IFrame with width 100%.
    Create a context variable (Say xmlFile) of type String and bind to Source property of PoratlIFrame .
    Put the xmlfile inside Project\src\mimes\Components\Package\
    Let the xml file name be Config1.xml.
    Write the following code inside wdDoinit()
    wdContext.currentContextElement().setPortalFrame(WDURLGenerator.getWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"Config1.xml"));
    Regards
    Fahad Hamsa

  • How to display an XML file as it is in browser that XI sent to my J2EE appl

    Hi all!
    I have a scenario like File->XI->J2EE appl.
    The file is getting picked up from my machine by XI.
    Now XI should send that XML file to my J2EE appl.
    My servlet receives that XML and displays as it is in browser. But am getting some error like:
    XML page cannot be displayed.
    XML document must have a top level element. Error processing resource 'http://localhost:7001/Invoke/DisplayRes'.
    I deployed my .ear file on BEA Weblogic application server9.0
    I found no error when i tested in SXI_MONI and RWB->Message monitor as well.
    This is my servlet code:
    public class DisplayRes extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doPost(request,response);
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
    String inputLine;
    StringBuffer sBuf = new StringBuffer();
    PrintWriter out = response.getWriter();
    response.setContentType("text/xml");
    while ((inputLine = brin.readLine()) != null)
    sBuf.append(inputLine);
    //out.setContentType("text/xml");
    //out.println(sBuf.toString());
    out.write(sBuf.toString());
    brin.close();
    out.flush();
    what went  wrong? Help me
    Thanks

    Hi
    Can anyone tell me how XI sends messages to applications like J2EE. In REceiver comm channel, I think we specify about the target system like J2EE appl.
    Aadapter Type: HTTP
                   Receiver
    Transport Protocol:  HTTP1.0
    Message Protocol:    XI payload in HTTP body
    Adapter Engine:      Integration Server
    Addressing Type:     URL address
    Target host:         localhost
    Service Number:      7001(Port number of Weblogic appl server--where my J2EE appl is deployed).
    Path     :  /Invoke/DisplayRes/
    Authentication Type:Use Logon Data for SAP System
    Content Type: text/xml
    Username:   xiappluser
    password:   xx
    XML code:   UTF-8
    I suppose XI sends msgs to http://localhost:7001/Invoke/DisplayRes/........
    in this example if am correct?
    Then I have given all tyhe necessary setting but my servlet is not able to display XML msg in browser?
    This is my servlet code:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
         PrintWriter out = response.getWriter();
         BufferedReader brin =new BufferedReader(new InputStreamReader(request.getInputStream()));
         String inputLine;
         StringBuffer sBuf = new StringBuffer();
            response.setContentType("text/xml");
         while ((inputLine = brin.readLine()) != null)
             sBuf.append(inputLine);
             out.println("hi");            
                out.println(sBuf.toString());
             brin.close();
             out.flush();
    What went wrong?
    Help me, all helpful answers are highly rewarded.
    Thanks

  • How to display an XML in Web Dynpro

    Hi,
    I am pretty new to Web Dynpro and have a specific requirement.
    I have a web dynpro page on which we display a table. One of the columns in the table is a XML message. Now on lead selection of each row I want to display the contents of the XML in an embedded control below the table. I have already implemented the functionality to download the XML message to file system but I want a capability to show the XML contents within my page in a formatted way.
    If I use a text view, the XML does not look very nice.
    I do not want to implement a new tree control based control now where I parse my xml file and then try to recursively generate a tree. This will take time for me as i am not very well versed with WD programming.
    Can anyone tell me if there exists any control in WD which can display the XML in formatted way?
    If you guys have used the new ABAP debugger and seen the XML viewer in it then you can get an idea of what I need. I am not sure about the control that the ABAP debugger uses. It will be good if someone can help me find something like that.
    After all WD is all about reusability.
    Regards,
    Vikas

    Hi Vikas,
       see this little example which creates a xml file to download and open in the browser. Put it in an action handler method.
    DATA lr_conv   TYPE REF TO cl_abap_conv_out_ce.
      DATA lv_data   TYPE        string.
      DATA lv_xfile  TYPE        xstring.
      lv_data = '<?xml version=1.0" encoding="utf-8"?> put your xml here'.
      cl_abap_conv_out_ce=>create( RECEIVING conv = lr_conv ).
      lr_conv->convert( EXPORTING data   = lv_data
            IMPORTING buffer = lv_xfile ).
      cl_wd_runtime_services=>attach_file_to_response(
                     EXPORTING
                         i_filename  = 'test.xml'
                         i_content   = lv_xfile
                         i_mime_type = 'application/xml' ).
    Hope this helps you. Revert if need some more help.
    Regards,
    Pavan.

  • How to display html content in flex hero..

    i need to display html content using flex hero for balckberry playbook..i could not find a component for it..i have tried with spark text area by setting its html text property via MobileTextField. bt i need a webview to load html content to execute javascript and all....Is there any component for it???? Please help....

    Hello,
    The only current way is to use an iFrame, or if you only need some html tags you could use the Text Layout Framework.
    Here this is the iFrame approach:
    http://code.google.com/p/flex-iframe/
    If the swc do not work in Flex4 just use its ource code which works...
    ...it is basically based on this:
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
    see also and vote, please:
    http://bugs.adobe.com/jira/browse/SDK-12291
    http://bugs.adobe.com/jira/browse/SDK-13740
    Regards
    Marc

  • How to  display / Embed XML in jsp ?

    hi, i have following files in my project and i would like to display stocks.xml file in jsp, when i open stocks.xml file in browers , it opens nice with the xsl style , but i can't seem to add it in my jsp. ?. my jsp only displays simple raw text from xml not the style as it is shown in browser by just clicking the stocks.xml file.......... thanks in advance ...
    ==============index.jsp=====================
    <%@ page contentType="text/xhtml" %>
    <html>
    <head>
    <title>Sample Application JSP Page</title>
    </head>
    <body bgcolor=white>
    <table border="0">
    <tr>
    <td align=center>
    <img src="images/logo.gif">
    </td>
    <td>
    <h1>Sample Application JSP Page</h1>
    application.
    </td>
    </tr>
    </table>
    <%= new String("Hello!") %>
    *{color:#ff6600}<jsp:include page="stocks.xml"></jsp:include>{color}*
    </body>
    </html>
    ==========stocks.xml======================
    <?xml version="1.0" encoding="UTF-8"?>
    {color:#339966}<?xml-stylesheet type="text/xsl" href="stocks.xsl"?>{color}
    <portfolio>
    <stock>
    <symbol>SUNW</symbol>
    <name>SunMicrosystems</name>
    <price>17.1</price>
    </stock>
    <stock>
    <symbol>AOL</symbol>
    <name>America Online</name>
    <price>51.05</price>
    </stock>
    <stock>
    <symbol>IBM</symbol>
    <name>International Business Machines</name>
    <price>116.10</price>
    </stock>
    <stock>
    <symbol>MOT</symbol>
    <name>MOTOROLA</name>
    <price>15.20</price>
    </stock>
    </portfolio>
    ===============================================
    ==================stocks.xsl======================
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    <html>
    <head>
    <title>Stocks</title>
    </head>
    <body bgcolor="#ffffcc" text="#0000ff">
    <xsl:apply-templates />
    </body>
    </html>
    </xsl:template>
    <xsl:template match="portfolio">
    <table border="2" width="50%">
    <tr>
    <th>Stock Symbol</th>
    <th>Company Name</th>
    <th>Price</th>
    </tr>
    <xsl:for-each select="stock">
    <tr>
    <td>
    <i>
    <xsl:value-of select="symbol" />
    </i>
    </td>
    <td>
    <xsl:value-of select="name" />
    </td>
    <td>
    <xsl:value-of select="price" />
    </td>
    </tr>
    </xsl:for-each>
    </table>
    </xsl:template>
    </xsl:stylesheet>
    Edited by: s_dhillon on Aug 31, 2008 8:15 PM
    Edited by: s_dhillon on Aug 31, 2008 8:21 PM

    Am not sure..
    may be by contentType

  • How to remove the XML attribute value in Indesign file by javascript

    Hi all,
    How to remove the XML attribute value in Indesign file.

    Try this,
    if(elm.xmlElements[i].xmlAttributes[j].name == "aid:pstyle" || elm.xmlElements[i].xmlAttributes[j].name == "aid:cstyle")
    Vandy

  • How to display an xml file using a servlet with the styles given in an XSL

    Dear Developer...
    i have xml and xsl files.
    Now i want to display the html output produced by the xsl and xml using a servlet...give me any samplecode.

    ... except for the "using XSLT" part. But that doesn't make sense anyway because XSLT doesn't display anything, it just transforms data.

  • How to display an xml file as a tree in html

    Hi, JAVA/XML/XSLT/HTML gurus,
    I have an xml file and want to display it as a tree in html using XSLT.
    Is there any example for this?
    King regards,
    AG

    ... except for the "using XSLT" part. But that doesn't make sense anyway because XSLT doesn't display anything, it just transforms data.

  • How to display pdf file in flex application

    hi,
    I am Ibran, I am using Flex4.5, in that i want to display a pdf file like images.
    How can i do it please anyone tell me.
    I have used navigateToURL(url),but this was going into navigation and i can't see my textfield and buttons.
    So without this  navigateToURL(url) how can i display a pdf file in flex without navigation so that i can see my textInputs and buttons.

    Flash does not have the ability to load/display/manipulate PDF files, so you can't open it directly in the flex application.  With clever HTML and javascript, you can make it appear that it is in the same window, but it will actually be in a separate window/div in the browser.  And yes, this has always seemed absurd to me that Adobe doesn't support PDF's......
    Mark

  • How can I transform xml to idoc with idoc_xml?

    Hi,
    I have to send shipping orders and receive shipping confirmations via the idoc_xml webservice. At this time I am able to send the shipping orders to a destination. Now I am trying to send xml data back to the idoc_xml service who should transform this xml (SHPCON) to an idoc and "books" this shipping confirmation automatically. But how should the xml look like to get this work?

    hi
    good
    its idoc_xml or idoc_xml_transform
    go through the below link hope it ll help you to solve your problem
    Check with below link :
    Re: IDOCS_OUTPUT_IN_XML_FORMAT -- IDOCS_OUTPUT_TO_FILE
    Re: any function module to write-xml schema of a idoctype to an internal table
    /people/michal.krawczyk2/blog/2005/11/13/xi-how-to-check-your-idocs-on-a-web-page-from-sapgui -> this will help you
    thanks
    mrutyun^

  • How to: Display Specific Xml Entry in AS3

    I have a very simple line of code that i'm trying to modify to display a specific entry in a xml file:
    AS3 Code:
    // The first step is to activate the XML object
    AmbientSettingsXML = new XML();
    With the XML Object now active you must now load an XML foramtted document.
    Any DTD or XLS formatting will be ignored.
    AmbientSettingsXML.onLoad = myLoad;
    AmbientSettingsXML.load("settings.xml");
    // Before proceeding to far into the program, make sure the XML document has loaded
    // Extract information from the XML file
    function myLoad(ok) {
    if (ok == true) {
    trace("ok");
    trace(AmbientSettingsXML);
    The Trace Displays:
    ok
    <?xml version="1.0"?>
    <settings>
    <appearance>
    <event_title>Streaming Demo 1</event_title>
    </appearance>
    </settings>
    So the question is, how do I display the "event_title" entry only? (String)
    Any help is appreciated,
    Thanks!

    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, completeHandler);
    var request:URLRequest = new URLRequest("yourxmlfile.xml");
    loader.load(request);
    function completeHandler(event:Event):void {
    var loader:URLLoader = URLLoader(event.target);
    var xml:XML = XML(loader.data);
    //xml.child("appearance")[0].child("event_title")[0];

  • How to display the xml content into my datagrid

    Hi Experts,
                     i have created a webservice for sales quotation through DI-Server.iam able to add a new sales quotation through my coding & iam able to get the sales quotation based on the DOcEntry in an *XML file*.
              The xml file that i got using DOCENTRY is in this way:--
    <?xml version="1.0" encoding="utf-8" ?>
    - <BOM>
    - <BO>
    - <AdmInfo>
      <Object>oRecordset</Object>
      </AdmInfo>
    - <OQUT>
    - <row>
      <DocEntry>8</DocEntry>
      <DocNum>8</DocNum>
      <DocDate>20080715</DocDate>
      <DocDueDate>20080815</DocDueDate>
      <CardCode>C0003</CardCode>
      <CardName>HP India</CardName>
      <DocTotal>14500.000000</DocTotal>
      <ItemCode>A00006</ItemCode>
      <Dscription>HP Officejet 7310 All-in-One</Dscription>
      <Quantity>1.000000</Quantity>
       <Price>14500.000000</Price>
      <Currency>INR</Currency>
       <DiscPrcnt>10.000000</DiscPrcnt>
      <LineTotal>14500.000000</LineTotal>
       </row>
      </OQUT>
      </BO>
      </BOM>
    Now the problem is from this xml content i should display the values in my datagrid like:
    DocEntryCardCodeDocDueDateItemCodeDscriptionQtyTotal
         8--C000320081116--A00006-HP-off jet-2 ---                     1000
    can anybody suggest me some ideas that how to get the SPECIFIED values into my datagrid...........
    regards,
    shangai.

    hi vincent,
                    Thanks for your reply.iam unable to understand these lines in your code..iam working in vb.net
    public static DataSet GetDataSetFromXML(XmlNode XMLNode)
    grid.DataSource = GetDataSetFromXML(Result.SelectSingleNode(xpath_string));
    this is my coding....it's throwing an error when i declare like this
    Public Sub GetDataSetFromXML(ByVal XmlNode)
            Dim ds As New DataSet
            Dim reader As XmlNodeReader
            reader = New XmlNodeReader(XmlNode)
            ds.ReadXml(reader)
            reader.Close()
            'Return ds --->(error with syntax)
        End Sub
    DataGrid1.DataSource = GetDataSetFromXML(oXmlReply.SelectSingleNode("//DocDueDate"))
                DataGrid1.DataBind()
    regards,
    shangai

Maybe you are looking for

  • Error while updating data using session and call transaction method

    Hi all,     i have to update data using MM01 transaction from flat file to database.i have used both session method and call transaction method to do that.in both the methods data has been transferred from internal tables to screens but while updatin

  • WD Exception

    Hi!, I'm beggining in WD programming. When I deploy and run an application, it appears in my IE6 explorer, but when an event occurs, I've the following exception: <b>Internal Server Error:   The Web Dynpro Application 'TableApp' has expired. Please r

  • Error handlling in function

    Hi, I have function which should return date if you pass in values. But when you pass in invalid number it should show an error. But my function when used it does not. Can any one help me how to error handle if you pass invalid number. Here is my fun

  • Will the iPhone 6.1.3 update slow down my iPhone 4?

    I've been a little reluctant to update my iPhone 4 from ios 5.0.1 to 6.1.3 because I'm worried that it will severely slow down my phone.  I had this problem happen to me before with my iPhone 3.  Every time I updated the softwear, my phone got slower

  • How can i start listener?

    i have installed oracle8.1.6 on solaris7,but i cannot start the listener. the following is the error message. LSNRCTL> start listener Message 1070 not found; No message file for product=network, facility=TNSTNSLSNR for Solaris: Version 8.1.6.0.0 - Pr