Displaying XML w/ XSLT styling in Flash

Hello -
I have a file that is displaying .xml info in Flash. I styled the .xml document outside of flash w/ .xslt. It works fine outside of Flash but doesn't work when displayed inside of Flash- Is there a way to make this work ???
Thanks

No, there is no way to make it work natively. Also, Flash has very limited support for HTML tags and only for CSS.

Similar Messages

  • Displaying xml as html in Flash

    Hi
    I'm struggling with an xml problem. Within my Flash movie
    (CS3), I have two dynamic text boxes (one titled 'title' and the
    other titled 'description'). The text and images are calling into
    Flash without a problem, but in the 'description' text box, I need
    to render hyperlinks as part of the xml text (the 'title' text box
    does not need to render as html - there are no hyperllinks). I'm
    doing this using CDATA tags, but although I've selected 'Render as
    html' for the text box titled 'description' in Flash, I'm not
    getting the hyperlinks (I'm actually seeing the tags being
    displayed in the Flash movie).
    Here's an example of my xml;
    quote:
    <image>
    <id>1</id>
    <title>Heading positioned here</title>
    <description><![CDATA[Body text positioned
    here.<a href="
    http://www.url-here.com">Click
    here</a> to view the products that make up this
    display.]]></description>
    <imageurl>IMAGES/image1.jpg</imageurl>
    </image>
    I'm fairly sure that the xml data is correct, which means
    that the missing link is in Flash, but I just can't crack it.
    I'd be really grateful for any help.
    Many thanks.

    Thanks for your reply, Ned.
    Are you talking abut ActionScript here? If so, how is this
    assigned to the text box (I can't attach ActionScript to the box
    itself)?
    Many thanks

  • Display xml in Datagrid

    Hi All,
    After fiddling this for almost a week, I finally come in seek
    of assistance and advice. let me explain my requirement as clearly
    as I possibly can. before you even proceed further, please make
    sure you a aware of the following:
    importing xml into flash
    usnig the XPathApi
    using datasets and Datagrids
    Summary
    I have a complex XML file (refer link below) that is
    generated from a database. my client wants these generated data to
    be displayed in a presentable format so that any visitor using this
    application can instantly get the data by querying into the XML
    File.
    I tried doing this with XML and XSLT i was able to display
    the data in a presentable format. but I faced an issue. I was
    unable to place a form text field and a submit button, so that the
    user gets the freedom to filter the data that he needs.
    So I seeked some advice on this topic at US and I was
    suggested to use XPathApi, after reading the documentation and some
    fiddling, I found a way to extract the data that i was supposed to
    retrieve. but now I face a new problem. since the XML is a bit
    complicating (for me at least). I found difficulties in displaying
    the extracted data to the data grid.
    I have attached the flash source file (v8) and (some what
    similar) the XML files for your reference. would appreciate if
    someone could help me achieve the objective. if you think there is
    another alternative to XPathApi, I willing to try it out.
    Try-out
    Currently the retrieval of the data is working perfectly, for
    example you can perform a query to list all the books that were
    published by 'Wrox' by entering the query in the text field, you
    will see the results in the "Trace" window.
    Source
    TIA

    "lerogke" <[email protected]> wrote in
    message
    news:go8i77$8og$[email protected]..
    > Hi again,
    >
    > i could resolve something, using labelfunction like
    this:
    >
    > private function getValue(item:Object,
    column:DataGridColumn):String{
    > return item.params.param.@value;
    > }
    >
    > This functions gives me all the values of the params but
    consecutive
    > without
    > any space between them.
    >
    > How could i look around each param to put space or some
    text between them
    > to
    > display in Datagrid?
    for each (param in
    item.child('params').child('param').attribute('value)){
    //stuff

  • Importing xml with xslt in InDesign CS4

    Hello All,
    i need someone's help who's an expert at xml and xslt features of InDesign CS4.
    i work in publication, besides our magazines we produce yearbooks with lots of repetative information fields in them. we get the data in xml fromat which we flow in to InDesign. the xml files are very simple, here's an example:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <Root>
    <Story>
          <Country> Afganistan </Country>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive <Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
         <Country> Albania </Country>
    etc.
    </Story>
    </Root>
    the problem is we don't want <Company_Code> and <Job_code> elements displayed in the InDesign file.
    so we created an xslt file that shoud get rid of these two unwanted elements (obviously the xml file above was pointed to this xslt file)
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <Story>
      <Country>
    <xsl:for-each select="Company_ID">
       <Company_ID>
          <xsl:value-of select="Company_Name"/>
          <xsl:value-of select="Address"/>
          <xsl:value-of select="Telephone_text"/>
          <xsl:values-of select="Fax_tex"/>
          <xsl:value-of select=Email_text"/>
          <xsl:value-of select="Website_text"/>
          <xsl:value-of select="Personel_text"/>
          <xsl:value-of select="Pesronelmail_text"/>
       </Company_ID>
      </xsl:for-each>
    </Story>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    but it doesn't work. could someone tell me what's wrong with the xslt file? or what would the correct xslt file look like?
    Thanks everyone!

    Here's the sort of thing I mean in more detail.
    First, the XML file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <?xml-stylesheet type="text/xsl" href="transform2.xsl"?>
    <Root>
    <Country>
    <Country_name>Afganistan</Country_name>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    <Company_ID>
       <Company_Name> Another Company </Company_Name>
       <Company_Code> 2 </Company_Code>
       <Address_text> Elswhere</Address_text>
       <Address_text> P.O.Box 123</Address_text>
       <Address_text>Another City</Address_text>
       <Address_text> 22005 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +12345678 </Telephone_text>
       <Fax_text> Fax: +12345678 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.dfhdfh.com </Website_text>
       <Personel_text> dfhdfhdfhdfhdfh</Personel_text>
       <Personelmail_text>dfhdfhdfhdfh</Personelmail_text>
       <Job_code> A2 </Job_code>
    </Company_ID>
    </Country>
         <Country>
    <Country_name>Albania</Country_name>
    <Company_ID>
       <Company_Name> Number 3 </Company_Name>
       <Company_Code>3</Company_Code>
       <Address_text>Somewhere in Albania</Address_text>
       <Address_text>Freedonia Avenue</Address_text>
       <Address_text>Whatever the captial of Albania is called</Address_text>
       <Address_text> 88888</Address_text>
       <Address_text> Albania </Address_text>
       <Telephone_text> Telephone: + 666 666 666 666 </Telephone_text>
       <Fax_text> Fax: + 777 777 777 777</Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.albaniar.com </Website_text>
       <Personel_text>Ludwig Wittgenstein, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    </Country>
    </Root>
    Note that I have renamed the XSL file "transform2.xsl". I have got rid of the "Story" tag, and I have nested the tags more appropriately, with a new tag "Country_name". Here's the XSL:
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <xsl:for-each select="/Root/Country">
    <Country>
    <Country_name><xsl:value-of select="Country_name"/></Country_name>
    <xsl:for-each select="Company_ID">
    <Company_Name><xsl:value-of select="Company_Name"/></Company_Name>
    <Address_text><xsl:value-of select="Address_text"/></Address_text>
    <Telephone_text><xsl:value-of select="Telephone_text"/></Telephone_text>
    <Fax_text><xsl:value-of select="Fax_text"/></Fax_text>
    <Email_text><xsl:value-of select="Email_text"/></Email_text>
    <Website_text><xsl:value-of select="Website_text"/></Website_text>
    <Personel_text><xsl:value-of select="Personel_text"/></Personel_text>
    <Personelmail_text><xsl:value-of select="Personelmail_text"/></Personelmail_text>
    </xsl:for-each>
    </Country>
    </xsl:for-each>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    (That file should be saved as "transform2.xsl" to match the link on line 2 of the XML.)
    Hope that works -- Jeremy

  • Not able to display XML file

    I'm running Safari 6.0.2. And previous to a recent update I was able to drag a XML file into the browser and it would display the contents. Now it does nothing. I'm guessing with the last update it removed an extension that used to allow this to happen. Can anyone suggest a good XML display extention they've had good luck with.
    Thanks!

    The only browser I am aware of that currently knows how to
    display XML is IE5. Otherwise, you will need to convert the XML
    into well-formed HTML or xHTML through and XSLT stylesheet.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Ravinder Kamal (guest) wrote:
    : I not able to display the XML file in my browser even after
    using
    : using an XSL Stylesheet. I am not using IE5 browser.
    : The output of command :
    : C\>java XSLSample iden.xsl empl.xml
    : <root>
    : <ROWSET>
    : <ROW num="1">
    : <EMP_ID>PMA42628M</EMP_ID>
    : <FNAME>Paolo</FNAME>
    : <MINIT>M</MINIT>
    : <LNAME>Accorti</LNAME>
    : <JOB_ID>13</JOB_ID>
    : <JOB_LVL>35</JOB_LVL>
    : <PUB_ID>0877</PUB_ID>
    : <HIRE_DATE>1992-08-27 00:00:00.0</HIRE_DATE>
    : </ROW>
    : </root>
    : where iden.xsl is :-
    : <?xml version="1.0"?>
    : <!-- Identity transformation -->
    : <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
    : <xsl:template match="*|@*|comment()|pi()|text()">
    : <xsl:copy>
    : <xsl:apply-templates
    : select="*|@*|comment()|pi()|text()"/>
    : </xsl:copy>
    : </xsl:template>
    : </xsl:stylesheet>
    : -R.S.Kamal
    null

  • How do you display xml file with xlst sheet in jsp

    I have an xml file with accompanying xslt file (and several images that are used in a single directory. If I doubleclick on the xml file, it displays perfectly in my browser - Formatting, images and all!
              The 100 dollar question - How do I duplicate this behavior in a JSP page in WebLogic 8.1 using the code in the xml and the accompanying xslt (formatting) file? I tried simple embedding the xml code in the jsp, but that didn't seem to work. What is the secret?
              Okay, I need to add a bit more information here. I understand that it is really easy to just redirect to the XML file. The issue is really security. I want the XML to be inside a jsp that will only allow validated users to view it.
              Another way to look at the problem would be, can I add a jsp security tag to the xml file? Or how to I add the xml code inside a jsp and keep the path references to the xslt and graphics.
              Hope the added information helps
              Thanks,
              Ken
              Message was edited by: KLee - 20050609 10:25 MST
              [email protected]

    This proved out to be the answer. Thanks for the direction!
              import java.io.File;
              import java.io.IOException;
              import java.io.InputStream;
              import java.io.OutputStream;
              import java.io.FileNotFoundException;
              import java.io.FileOutputStream;
              import javax.servlet.ServletException;
              import javax.servlet.http.HttpServlet;
              import javax.servlet.http.HttpServletRequest;
              import javax.servlet.http.HttpServletResponse;
              import javax.xml.transform.Transformer;
              import javax.xml.transform.TransformerConfigurationException;
              import javax.xml.transform.TransformerException;
              import javax.xml.transform.TransformerFactory;
              import javax.xml.transform.stream.StreamResult;
              import javax.xml.transform.stream.StreamSource;
              public class XML_XSLT_Servlet extends HttpServlet {
              protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
                        String xmlfile = req.getParameter("xmlfile"); if (xmlfile==null) xmlfile = "test.xml";
                        String xsltfile = req.getParameter("xsltfile"); if (xsltfile==null) xsltfile = "test.xslt";
                        /* Test if file exists!, or use default file */
                        File f1 = new File(getServletContext().getRealPath("WEB-INF/displayfiles/"), xmlfile);
                        File f2 = new File(getServletContext().getRealPath("WEB-INF/displayfiles/"), xsltfile);
                   if (f1.exists() && f2.exists()) {
                             // System.out.println("Files Found");
                        } else {
                             System.out.println("XML and XSLT Files NOT Found");
                             System.out.println(f1.getPath());
                             System.out.println(f1.getName());
                             xmlfile = "test.xml";
                             xsltfile = "test.xslt";
              InputStream fileXML = getServletContext().getResourceAsStream("WEB-INF/displayfiles/" + xmlfile);
              InputStream fileXSLT = getServletContext().getResourceAsStream("WEB-INF/displayfiles/" + xsltfile);
              OutputStream os = res.getOutputStream();
              TransformerFactory xFactory = TransformerFactory.newInstance();
              StreamSource stylesheet = new StreamSource(fileXSLT);
              Transformer xformer = null;
              try {
              xformer = xFactory.newTransformer(stylesheet);
              } catch (TransformerConfigurationException tfce) {
              tfce.printStackTrace();
              StreamSource input = new StreamSource(fileXML);
              StreamResult output = null;
              try {
              output = new StreamResult(os);
              } catch (Exception e) {
              e.printStackTrace();
              try {
              xformer.transform(input, output);
              } catch (TransformerException xfe) {
              xfe.printStackTrace();
              <pre></pre><pre></pre>

  • Displaying XML with JDeveloper

    Using JDev 10.1.3 for an ADF + Struts application,
    What is the smartest way of displaying XML documents, with different XML formats/structure, stored in a CLOB field of a database.
    I have already .xslt stylesheets for each different type of XML file; I plan to have this .xslt files as other column in the database.
    I would like to know how to incorporate this xslt on my project and specially how to use it when displaying the information XML/CLOB to the user?
    Any samples, ideas, url, etcx will be welcome.
    Thanks,
    OM

    i don't know if oracle has a product for this but they would have to plan one to embed in JDeveloper.
    i'm using authentic from altova that permit you to define entry helpers based on a xml schema to edit a document and to render it in html, rtf or pdf. I think it is possible to embed it in a java or web application. The best way is to ask altova support. For sure other similar solutions exists also.

  • Displaying XML Document in new browser window

    Hi,
    I have a hyperlink on my page. When I click on it, it will open a new IE window and display xml document.
    The new window is displaying some of the xml and at the end displaying the following:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    End element was missing the character '>'. Error processing resource 'http://localhost:28080/benchmark/faces/displayXMLDocu...
    However, I cut and paste the xml String where I write it to the HTTPServletResponse to XMLSPY and it displays correctly.
    Please let me know.
    Rgrds

    Here are the steps:
    1. I created page1 that has a hyperlink.
    2. Hyperlink property are set to display page2 in a new window. (popup).
    3. page2.prerender() method, I set the response to the following:
    public void prerender() {
    javax.faces.context.ExternalContext ec = this.getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ec.getResponse();
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.setHeader("Cache-Control","must-revalidate");
    response.setHeader("Cache-Control","max-age=0");
    response.setHeader("Pragma","no-cache");
    response.setHeader("Expires","0");
    response.setContentType("text/xml");
    response.setBufferSize(5000);
    String xmlString = getRequestBean1().getBookingPnrDetailsXML();
    try{
    xmlString="<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><test1>this is a test</test1><victor>Hello Victor</victor></root>";
    PrintWriter out = new PrintWriter(response.getOutputStream());
    log(xmlString);
    out.print(xmlString);
    }catch(IOException io){
    System.out.println("" + io.getMessage());
    io.printStackTrace();
    4.page2.jsp code is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/xml;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view/>
    <ui:page binding="#{displayXMLDocument.page1}" id="page1"/>
    <ui:html binding="#{displayXMLDocument.html1}" id="html1"/>
    <ui:head binding="#{displayXMLDocument.head1}" id="head1"/>
    <ui:link binding="#{displayXMLDocument.link1}" id="link1"/>
    <ui:body binding="#{displayXMLDocument.body1}" id="body1"/>
    <ui:form binding="#{displayXMLDocument.form1}" id="form1"/>
    </jsp:root>
    please let me know.
    Rgrds.

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • IE + SVG = "Cannot display XML page" ?

    Dear friends,
       I am from Taiwan.  I have a question about SVG display on IE. 
       I have a very simply SVG file as the following code.  I installed Ferdora R12 with apache web server (192.168.0.8) inside my company.
    I installed Tomcat 6.0 on my PC(192.168.0.100, window 7 with IE8.0).  I put this SVG file on Fedora, and I can see the vector graphs through
    Chrome and Firefox, but not IE(already installed SVG viewer, with the error message as following).  I put this SVG file on my PC, I can see the vector graphs by IE, Chrome and Firefox through Tomcat or opening file directly. I even put this SVG file on the web server of my company, and vector graphs can be displayed well through all of IE, Chrome and Firefox.
      The problem seems only happen in the situation "Fedora R12 + IE".  Do you have any idea of this problem?  I really need your help.
      Thank you.
    ======= Code =============
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg id="svg00" version="1.1" xmlns="http://www.w3.org/2000/svg" >
    <svg id="svg01" x="0" y="0" width="654.1" height="654.1" version="1.1" xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink">
        <a xlink:href="http://www.w3.org//Graphics//SVG//Overview.htm8">
            <rect x="10" y="10" width="100" height="30" rx="10" ry="10"
                  style="fill:lightgrey"/>
            <text x="30" y="30" font-size="12">Click here</text>
        </a>
        <a xlink:href="http://www.ibm.com//developerworks/">
            <circle cx="100" cy="100" r="50" style="fill:grey"/>
            <text x="80" y="100" font-size="12">Or here</text>
        </a>
        <a xlink:href="http://www.ibm.com/" target="new">
            <polygon
                  points="60 160,165 172,180 60,290 290,272 280,172 285,250 255"
                  style="fill:dimgrey"/>
            <text x="160" y="200" font-size="12">Or even here</text>
        </a>
    </svg>
    </svg>
    ==========================
    The error message is in Chinese, but I translate it as possible as I can.
    ====== Error message ==========
    Cannot display XML page
    Cannot use style table (or form) to view XML input. Please correct this problem and reload this page, or try again later.
    Unidentified error with processing resourse
    There is something wrong with 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'
    =============================

    Hi,
    The string is not correctly formed ( a quote and a concatenation ) :
    Your url :
    v_url:=nvl(v_rep_port,'http://'||v_rep_HOST ||':'||v_rep_port||')||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_rep_svr;
    The Correction :
    v_url:=nvl(v_rep_port,'http://'||v_rep_HOST ||':'||v_rep_port)||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_rep_svr;
    Hope it helps
    Mohamed Dadi

  • How to display XML file that XI sent to my j2ee appl?

    Hi,
    In my scenario File->XI->J2EE appl.
    I got 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.All helpful answers are highly rewarded.
    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

  • Converting string to xml in xslt

    Hi we are trying to convert string to xml in xslt but it is getting errored out.
    We have followed the procedure mentioned at http://download.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a88894/adx04xsl.htm under the section "How Do I Convert A String to a Nodeset in XSL?".
    Standard procedure mentioned by oracle is not working. Is it a known bug?

    Chk this thread.
    Re: Regd: File Conversion to XML format

  • Examples related to XML and XSLT

    Hello friends,
    In relation to XML and XSLT
    1. As I can transform an XML file using XSLT.
    2. I view the XML file using XSLT
    3. XSL and XSLT files are equal...?
    Thanks for the support

    http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPXSLT6.html

  • Transforming XML through XSLT

    Hi Folks,
    I just need to transform a basic xml using xslt. I have built and xsl file which works fine on the given xml input. I have test through AltovaXMLSpy tool.
    Now I want to do the same through my java class with xml as input string and xsl file.
    I have seen this example:
    package com.ibn.util;
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.URL;
    import org.xml.sax.SAXException;
    import org.apache.xalan.*;
    * A simple demo of Xalan 1. This code was originally written using
    * Xalan 1.2.2.  It will not work with Xalan 2.
    public class SimpleXalan1 {
         * Accept two command line arguments: the name of an XML file, and
         * the name of an XSLT stylesheet. The result of the transformation
         * is written to stdout.
        public static void main(String[] args)
                throws MalformedURLException, SAXException {
            if (args.length != 2) {
                System.err.println("Usage:");
                System.err.println("  java " + SimpleXalan1.class.getName(  )
                        + " xmlFileName xsltFileName");
                System.exit(1);
            String xmlFileName = args[0];
            String xsltFileName = args[1];
            String xmlSystemId = new File(xmlFileName).toURL().toExternalForm(  );
            String xsltSystemId = new File(xsltFileName).toURL().toExternalForm(  );
            org.apache.xalan.xslt.XSLTProcessor processor = org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor();
            org.apache.xalan.xslt.XSLTInputSource xmlInputSource =
                    new org.apache.xalan.xslt.XSLTInputSource(xmlSystemId);
            org.apache.xalan.xslt.XSLTInputSource xsltInputSource =
                    new org.apache.xalan.xslt.XSLTInputSource(xsltSystemId);
            org.apache.xalan.xslt.XSLTResultTarget resultTree =
                    new org.apache.xalan.xslt.XSLTResultTarget(System.out);
            processor.process(xmlInputSource, xsltInputSource, resultTree);
    }but on compilation it gives errors as org.apache.xalan.xslt is not in the class path. Could anybody suggest which jars i need to resolve this problem and where I can get that? or is there any other better solution provided by the core java api?
    Thanks.

    thanks dude.
    Did it the following was as i wanted to read the transformation output as well.
    public String doTransform(String xmlString){
        ByteArrayOutputStream result = new ByteArrayOutputStream();
        //Result output = new StreamResult(result);
        try{
          DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
          Document document = parser.parse(new InputSource(new StringReader(xmlString)));
          Transformer transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(new FileInputStream("/IBNSubscriberServlet/src/com/ibn/util/g7.xsl")));
          Source source = new DOMSource(document);
          //output = new StreamResult(System.out);
          transformer.transform(source, new StreamResult(result));
          return result.toString();
        }catch (Exception e){
          System.out.println(e.getMessage());
        return result.toString();
      }Edited by: buttsp on Sep 16, 2009 4:18 AM
    Edited by: buttsp on Sep 16, 2009 4:18 AM

  • Problem with displaying XML Content well formatted.

    Hi all,
    I am developing a website which have one functionality to display XML content which is received from some other party.
    I am using TextArea for displaying this XML content on my webpage. As this XML content is not at all formatted it looks very ugly for a human to read.
    I want this XML content to be displayed well formatted, As Mozilla Firefox display it hierarchically and well formatted.
    Kindly give some suggestion for displaying XML well formatted on a webpage.
    Any comments from you people will help me.
    Thanks
    typurohit.

    The following link is a XML-based document. An XSL stylesheet transforms the XML document to HTML in the web browser. Feel free to grab a copy of the stylesheet to use as a guide.
    http://www.masonicartbook.com/production.htm
    Good luck!

Maybe you are looking for