Display CDATA in a String XML into JSP

hi ,
I have the following requirement..
String xmlString="<?xml version='1.0' standalone='yes'?><Errors><PROCESSID>GRANT00100478</PROCESSID>
<formname>Error</formname><ProcessingError>0<TYPE>XMLWELLFORMATERROR</TYPE>
<LEVEL>FATAL</LEVEL**>
<INFO><![CDATA[ DefaultValidationHandler found 2 problems: 2 Errors: 1: (line 2 column 11168) cvc-minLength-valid: Value 'CA123456'
with length = '8' is not facet-valid with respect to minLength '9' for type 'DUNSIDDataType'. 2: (line 2 column 11168) cvc-type.3.1.3:
The value 'CA123456' of element 'globLib:DUNSID' is not valid. The document is NOT valid!]]></INFO>**<ERRORTYPEACTION />
<ERRORTYPEDESCRIPTION><![CDATA[ XML is not Well-Formed.]]></ERRORTYPEDESCRIPTION><ERRORTYPELONGDESCRIPTION>
<![CDATA[]]></ERRORTYPELONGDESCRIPTION></ProcessingError></Errors>";
My requirement is i need to display the <INFO> tag value in my JSP ..
Please help me in this matter..Please send me sample code...if possible..
thanks in advance...
regards,
SUBHASH.
Edited by: subbuhunk on Apr 3, 2008 3:37 AM
Edited by: subbuhunk on Apr 3, 2008 3:38 AM

I would use the JSTL <x:parse> element to parse the string, followed by the <x:out> element with a suitable XPath expression to select that node.

Similar Messages

  • Passing XML into JSP Variable

    I want to do the following
    <%
    response.setContentType("text.xsl");
    String something = ""+<xsl:value-of select='@id' />+"";
    %>
    But seems like the xsl doesn't render
    Can someone point me in he right directions

    What is the name of this variable?
    Record
    XML_F52E2B61-18A1-11D1-B105-00805F49916B
    1
    <pie><slice title="Group1" pull_out="false">5</slice><slice title="Group2" pull_out="false">19</slice><slice title="Group3" pull_out="false">3</slice><slice title="Group4" pull_out="true">93</slice></pie>
    What is the line of code the generated this error?
    Complex cannot be converted into simple variable
    Properly combine the variable with the function call and all should be good.

  • 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 export string in CDATA with the jaxb xml writer?

    How to export string in CDATA with the jaxb xml writer?
    It read CDATA no problem but it is lost on write.

    Found it:
    ### THIS WORKS WITH SUN JAXB REFERENCE IMPLEMENTATION. ###
    (Not tested with any other)
    In the xsd, you must create a type for your string-like element.
    Then associate a data type converter class to this new type, which will produce CDATA tags.
    Then you must set a custom characterEscapeHandler to avoid the default xml escaping in order to preserve the previously produced CDATA tag.
    Good luck.
    -----type converter-----
    import javax.xml.bind.DatatypeConverter;
    public class ExpressionConverter {
         * Convert an expression from an XML file into an internal representation. JAXB will
         * probably have already stripped off the CDATA encapsulation. As a result, this method
         * simply invokes the JAXB type conversion for strings but does not take any other action.
         * @param text an XML-compliant expression
         * @return a pure string expression
         public static String parse(String text) {
              String result = DatatypeConverter.parseString(text);
              return result;
         * Convert an expression from its internal representation to an XML-compliant version.
         * This method will simply surround the string in a CDATA block and return the result.
         * @param text a pure string expression
         * @return the expression encapsulated within a CDATA block
         public static String print(String text) {
              StringBuffer sb = new StringBuffer(text.length() + 20); //should add the length of the CDATA tags + 8 EOLs to be safe
              sb.append("<![CDATA[");
              sb.append(wrapLines(text, 80));
              sb.append("]]>");
              return DatatypeConverter.printString(sb.toString());
         * Provides line-wrapping for long text strings. EOL indicators are inserted at
         * word boundaries once a specified line-length has been exceeded.
         * @param text the string to be wrapped
         * @param lineLength the maximum number of characters that should be included in a single line
         * @return the new string with appropriate EOL insertions
         private static String wrapLines(String text, int lineLength) {
              //wrap logic, watchout for quoted strings!!!!
              return text;
    ------in caller----
    Marshaller writer = ......
    writer.setProperty("com.sun.xml.bind.characterEscapeHandler", new NoCharacterEscapeHandler());
    -----escaper-----
    import java.io.IOException;
    import java.io.Writer;
    import com.sun.xml.bind.marshaller.CharacterEscapeHandler;
    public class NoCharacterEscapeHandler implements CharacterEscapeHandler {
         * Escape characters inside the buffer and send the output to the writer.
         * @param buf buffer of characters to be encoded
         * @param start the index position of the first character that should be encoded
         * @param len the number of characters that should be encoded
         * @param isAttValue true, if the buffer represents an XML tag attribute
         * @param out the output stream
         * @throws IOException if the writing process fails
         public void escape(char[] buf, int start, int len, boolean isAttValue, Writer out) throws IOException {
              for (int i = start; i < start + len; i++) {
                   char ch = buf;
                   if (isAttValue) {
                        // isAttValue is set to true when the marshaller is processing
                        // attribute values. Inside attribute values, there are more
                        // things you need to escape, usually.
                        if (ch == '&') {
                             out.write("&");
                        } else if (ch == '>') {
                             out.write(">");
                        } else if (ch == '<') {
                             out.write("<");
                        } else if (ch == '"') {
                             out.write(""");
                        } else if (ch == '\'') {
                             out.write("&apos;");
                        } else if (ch > 0x7F) {
                             // escape everything above ASCII to &#xXXXX;
                             out.write("&#x");
                             out.write(Integer.toHexString(ch));
                             out.write(";");
                        } else {
                             out.write(ch);
                   } else {
                        out.write(ch);
              return;

  • How would I do a http post of the below listed XML string within a JSP?

    Hi,
    How would I do a http post of the below listed XML string within a JSP?
    <DoService xmlns="http://www.gdinrw.org/wss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WSS" version="1.0">
    <ServiceRequest DCP="HTTP_POST" mimeType="text/xml" encoding="UTF-8"><![CDATA[REQUEST=GetCapabilities&SERVICE=WMS]]></ServiceRequest>
    <AuthMethod>urn:opengeospatial:authNMethod:OWS:1.0:password</AuthMethod>
    <Credentials>guest,guest</Credentials>
    <FacadeUrl>https://bern:8443/wss_umn_wms/WSS</FacadeUrl>
    </DoService>
    Thanks,
    John

    Yes,
    I need to set up data as POST format before I POST it.
    To be more specific I know how to post within a JSP if an xml element is like:
    <AuthMethod>urn:opengeospatial:authNMethod:OWS:1.0:password</AuthMethod>
    where the field is AuthMethod and the value is urn:opengeospatial:authNMethod:OWS:1.0:password
    but what I am not sure of is when the field has values embedded within it like:
    <ServiceRequest DCP="HTTP_POST" mimeType="text/xml" encoding="UTF-8"><![CDATA[REQUEST=GetCapabilities&SERVICE=WMS]]></ServiceRequest>:
    It has a field of ServiceRequest and a value of ![CDATA[REQUEST=GetCapabilities&SERVICE=WMS]]
    but it also other value embedded with ServiceRequest like mimeType="text/xml" .
    Thanks,
    John

  • How to Parse XML into String in BPEL?

    Hi,
    Can anyone tell me, how can I parse XML into String?
    I am taking input from File Adapter, File adapter is reading that XML.
    Then in assign activity i am using XPath expression(built functions) using XMLParser(),doTranslateToNative() etc.. many functions I have tried but XML is not getting parsed into String Variable.
    Please help me asap.
    Thanks
    Shikha

    Thanks a lot Eric.
    I am trying this, oraext:get-content-as-string('receiveInput_Read_InputVariable','body','/ns3:orders')
    but getting this error
    <bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is oraext:get-content-as-string('receiveInput_Read_InputVariable','body','/ns3:orders'). The XPath expression failed to execute; the reason was: internal xpath error. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>

  • XML into one string element

    Hello,
            In Graphical mapping, Could anyone pls tell me in detail about how to achieve One whole xml into one string element. This XML file i want to send to DATABASE.

    Thi blog might be of some help
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

  • How to write XML into file using JSP

    Hello,
    I am parsing a XML file, then updating some of it content and trying to write back the updated file into the same location as an xml document but its not happening correctly....it gets written like this.
    &_lt;db_name&_gt;dataext&_lt;/db_name&_gt;
    Here is my code......somebody please advise
    <%@ page contentType="text/html"%>
    <%@ page import="java.io.*,
                        java.util.*,
                        org.jdom.*,
                        org.jdom.input.SAXBuilder,
                        org.jdom.output.*" %>
    <%
    String xml_file = "webapps/root/web-inf/admin.xml";
    SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
    Document l_doc = builder.build(new File(xml_file));
    Element root = l_doc.getRootElement();
    List admin = root.getChildren("db");
    Iterator loop = admin.iterator();
    while ( loop.hasNext()) {
         Element ele = (Element)loop.next();
         String state = ele.getChild("state").getText();
         String name = ele.getChild("db_name").getText();
         String ip = ele.getChild("db_ip").getText();
         if(state.equals("Florida")) {
              ele.getChild("db_ip").setText("209.11.111.1");
    XMLOutputter l_format = new XMLOutputter();
    String ls_result = l_format.outputString(l_doc);
    root.setText(ls_result);
    ls_result = l_format.outputString(l_doc);
    %>
    <html><head><title></title></head>
    <body>
    <%
         try {
              FileOutputStream ostream = new FileOutputStream("c:\\admin.xml");
              ObjectOutputStream p = new ObjectOutputStream(ostream);
              p.writeObject(ls_result);
              p.flush();
              ostream.close();
         catch(Exception e) {
              out.println(e.toString());
    %>
    </body>
    </html>     

    thanks amgandhi.....
    I found a solution for it, courtesy of this site:
    http://www.topxml.com/tutorials/main.asp?id=jdom&page=15
    <-********************************************************->
    import org.jdom.output.XMLOutputter;
    import org.jdom.*;
    import java.io.*;
    import java.util.*;
    // Write a program that creates document with a
    // single root element. Add a comment to the
    // root element, and assign the document's XML to
    // a local string. Finally, write the String to
    // System.out, and write the document to a text file.
    // For bonus points, allow the user to specify the
    // file name on the command line.
    public class ws3
    public static void main(String[] args)
    String filename = "default.xml";
    if(args.length > 0) filename = args[0];
    Element root = new Element("simple");
    Document doc = new Document(root);
    Comment cmt = new Comment("A bare document!");
    root.addContent(cmt);
    XMLOutputter outputter = new XMLOutputter(" ",
    true);
    String xml = outputter.outputString(doc);
    System.out.println(xml);
    writeToFile(filename, doc);
    private static void writeToFile(String fname,
    Document doc)
    try {
    FileOutputStream out =
    new FileOutputStream(fname);
    XMLOutputter serializer =
    new XMLOutputter(" ", true);
    serializer.output(doc, out);
    out.flush();
    out.close();
    catch (IOException e) {
    System.err.println(e);
    }

  • Xml to jsp transformation

    Hi All,
    I have an xml file created from database which contains certain fields in french.
    Now using this file as input source and a xsl file i am creating a jsp. In the xml file all the french characters appear as in database, but after transformation into jsp i get encoding problems.
    I am using StringBuffer and FileOutputStream to write to the xml file.
    If I donot change the transformer OutputProperty my jsp displays fine in web server but French characters are all messed up.
    If I use "utf-16" encoding in transformation
    i.e if i set the transformer as follows:
    transformer.setOutputProperty("encoding", "utf-16");
    characters in the jsp generated are all correct but I cannot bring up my jsp in web server.
    Any suggestions please.
    Thanks
    Rajeev

    Okay, you know how to set the encoding in the transformer. That's one step. Another step is, you have to set the encoding in your OutputStream to be the same. You haven't showed how you're using your OutputStream, you just said you were using a FileOutputStream which surely must be a misprint, as the rest of your post suggests you are sending the XML to the JSP's response. Also, you have to set the encoding of your HTTP response to be the same encoding you used everywhere else, using its setCharacterEncoding() method.
    I would suggest ISO-8859-1 for your encoding, since that covers all Western European characters and all browsers understand it.

  • XMLAGG giving ORA-19011 when creating CDATA with large embedded XML

    What I'm trying to achieve is to embed XML (XMLTYPE return type) inside a CDATA block. However, I'm receiving "ORA-19011: Character string buffer too small" when generating large amounts of information within the CDATA block using XMLCDATA within an XMLAGG function.
    Allow me to give a step by step explanation through the thought process.
    h4. Creating the inner XML element
    For example, suppose I have the subquery below
    select
        XMLELEMENT("InnerElement",DUMMY) as RESULT
    from dual
    ;I would get the following.
    RESULT                           
    <InnerElement>X</InnerElement>h4. Creating outer XML element, embedding inner XML element in CDATA
    Now, if I my desire were to embed XML inside a CDATA block, that's within another XML element, I can achieve it by doing so
    select
        XMLELEMENT("OuterElement",
            XMLCDATA(XML_RESULT)
        ) XML_IN_CDATA_RESULT
    FROM
    (select
        XMLELEMENT("InnerElement",DUMMY) as XML_RESULT
    from dual)
    ;This gets exactly what I want, embedding XML into CDATA block, and CDATA block is in an XML element.
    XML_IN_CDATA_RESULT                                                       
    <OuterElement><![CDATA[<InnerElement>X</InnerElement>]]></OuterElement>    So far so good. But the real-world dataset naturally isn't that tiny. We'd have more than one record. For reporting, I'd like to put all the <OuterElement> under a XML root.
    h4. Now, I want to put that data in XML root element called <Root>, and aggregate all the <OuterElement> under it.
    select
        XMLELEMENT("Root",
            XMLAGG(
                XMLELEMENT("OuterElement",
                    XMLCDATA(INNER_XML_RESULT)
    FROM
        (select
             XMLELEMENT("InnerElement",DUMMY) as INNER_XML_RESULT
         from dual)
    ;And to my excitement, I get what I want..
    <Root>
        <OuterElement><![CDATA[<InnerElement>X</InnerElement>]]></OuterElement>
        <OuterElement><![CDATA[<InnerElement>Y</InnerElement>]]></OuterElement>
        <OuterElement><![CDATA[<InnerElement>Z</InnerElement>]]></OuterElement>
    </Root>  But... like the real world again... the content of <InnerElement> isn't always so small and simple.
    h4. The problem comes when <InnerElement> contains lots and lots of data.
    When attempting to generate large XML, XMLAGG complains the following:
    ORA-19011: Character string buffer too smallThe challenge is to keep the XML formatting of <InnerElement> within CDATA. A particular testing tool I'm using parses XML out of a CDATA block. I'm hoping to use [Oracle] SQL to generate a test suite to be imported to the testing tool.
    I would appreciate any help and insight I could receive, and hopefully overcome this roadblock.
    Edited by: user6068303 on Jan 11, 2013 12:33 PM
    Edited by: user6068303 on Jan 11, 2013 12:34 PM

    That's an expected error.
    XMLCDATA takes a string as input, but you're passing it an XMLType instance, therefore an implicit conversion occurs from XMLType to VARCHAR2 which is, as you know, limited to 4000 bytes.
    This indeed gives an error :
    SQL> select xmlelement("OuterElement", xmlcdata(inner_xml))
      2  from (
      3    select xmlelement("InnerElement", rpad(to_clob('X'),8000,'X')) as inner_xml
      4    from dual
      5  ) ;
    ERROR:
    ORA-19011: Character string buffer too small
    no rows selectedThe solution is to serialize the XMLType to CLOB before passing it to XMLCDATA :
    SQL> select xmlelement("OuterElement",
      2           xmlcdata(xmlserialize(document inner_xml))
      3         )
      4  from (
      5    select xmlelement("InnerElement", rpad(to_clob('X'),8000,'X')) as inner_xml
      6    from dual
      7  ) ;
    XMLELEMENT("OUTERELEMENT",XMLCDATA(XMLSERIALIZE(DOCUMENTINNER_XML)))
    <OuterElement><![CDATA[<InnerElement>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(use getClobVal method if your version doesn't support XMLSerialize)

  • Creating XML using JSP

    Hi I want to create a xml using JSP For eg I want to create a report
              and I want to take all the data required for the report from the user
              and want to put all the information in a session and whenever a user
              wants to see the html output I should be able to parse the xml file
              and show it to user.
              I know it is doable but I am confused about storing the data in
              session and concerting that data into XML file any help would be
              great.
              Thanks,
              Preeti
              

    Sounds like you might want to look at XML data binding. Something like JAXB
              or Castor can create an object that can be turned into XML by merely calling
              a single method and probably streamed to Xalan or whatever to create HTML.
              However, don't quote me on this - I am having enough troubles with trying to
              get the compiled Objects to be as I wish. Basically, they both take your
              DTD with an extra file that defines the types to be used in the classes -
              i.e. instead of string int might be used - and which tags to turn into
              classes and general information such as this about the output of your
              classes. You then simply call Unmarshal (for both castor and JAXB) and it
              loads the file from the selected input stream into the created object, you
              edit the object, what ever - store it on the server... and call Marshal to
              get back the xml... as this is all using streams it could be passed to Xalan
              for processing i think...
              Hope I've helped, and answered your question a little!
              "Preeti Sikri" <[email protected]> wrote in message
              news:[email protected]...
              > Hi I want to create a xml using JSP For eg I want to create a report
              > and I want to take all the data required for the report from the user
              > and want to put all the information in a session and whenever a user
              > wants to see the html output I should be able to parse the xml file
              > and show it to user.
              >
              > I know it is doable but I am confused about storing the data in
              > session and concerting that data into XML file any help would be
              > great.
              >
              > Thanks,
              > Preeti
              

  • Nested XML into comboBox

    Well as stupid as this sounds I can populate a datagrid from
    a dynamic xml source(ASP) using HTTPservice but a basic lack of
    understanding is preventing me from using this data in a comboBox
    Below is my application source that works for populating the
    datagrid in it, but when the data is used in the comboBox as it's
    dataprovider the value is "[object][object]" Ive tried a bunch of
    stuff but I think im conceptualy misunderstanding something about
    retreiving nested values...
    --MY BROKEN EXAMPLE---
    --XML-output-by-asp-document--------
    <product>
    <category>Tile</category>
    <name>Angelic Peach</name>
    </product>
    <product>
    <category>Tile</category>
    <name>Cosmo</name>
    </product>
    <product>
    <category>Tile</category>
    <name>Durva</name>
    </product>
    <product>
    <category>Tile</category>
    <name>Isosilis</name>
    </product>
    <product>
    <category>Tile</category>
    <name>Magaloth</name>
    </product>
    <product>
    <category>Tile</category>
    <name>Trunklin</name>
    </product>
    <product>
    <category>Tile</category>
    <name>Googolfletch</name>
    </product>
    <product>
    <category>Tile</category>
    <name>Moskurbelf</name>
    </product>
    <product>
    <category>Tile</category>
    <name>DoChoaKoa</name>
    </product>
    ---products-component-for-use-in-main-application---
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="400" height="300"
    creationComplete="this.productStream.send();">
    <mx:Script>
    <![CDATA[
    import mx.utils.ArrayUtil;
    import mx.utils.XMLUtil
    //var urlPath="
    http://localhost/rogerwilko/AndeanStone/xml.asp";
    function xmlRequest():void {
    // Cancel all previous pending calls.
    productStream.cancel();
    var params:Object = new Object();
    params.func = 'products';
    productStream.send(params);
    ]]>
    </mx:Script>
    <mx:HTTPService id="productStream"
    url="
    http://localhost/rogerwilko/AndeanStone/xml.asp"/>
    <mx:Label text="Select A Product Category" top="0"
    left="0"/>
    <mx:ComboBox id="prodCatList"
    dataProvider="{mx.utils.ArrayUtil.toArray(this.productStream.lastResult.product)}"
    width="200" left="0" top="20" cornerRadius="3" fillAlphas="[0.5,
    0.5]" themeColor="#00ff00" alpha="0.49">
    </mx:ComboBox>
    <mx:DataGrid id="prodList"
    dataProvider="{mx.utils.ArrayUtil.toArray(this.productStream.lastResult.product)}"
    columnWidth="200" width="200" left="0" top="55">
    <mx:columns>
    <mx:DataGridColumn headerText="{prodCatList.value}"
    dataField="name"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Canvas>
    Thanks in advance for any help you can provide me
    leo

    You will need to specify either a labelField or
    labelFunction. You can use a labelField if the value you want to
    show in the combo box is a first level property of the item.
    If the data you want to display is deeper in the item object,
    and you need to "dot down" to get it use a labelFunction.
    HTTPService resultFormat defaults to Object. I have never
    been comfortable about the way Flex converts xml into objects, so I
    always use e4x. This choice affects the structure of your item
    objects, and therefore the way you need to access the item objects
    properties.
    Try labelField, anif that doesn't work use a labelFunction.
    Note, you can debug the labelFunction quite handily.
    Tracy

  • Unable to import xml into my CS4 project

    Hi folks,
    I am trying to embed a 3rd party flash component into my current flash project.  As a stand alone, the component works fine but when I try and import the xml file for the component into my current flash project library, the message I get:
    " one or more files were not imported because there were problems reading them"!!!
    I have tried importing the xml file into another dummy cs4 project on another machine and again no success, so I believe there are elements within the xml file that will not work with cs4.  Below is the xml file code.  I would appreciate if anyone can spot anything wrong with this file as to why it wont import into flash.  Even try and import it yourself and see what I mean.
    Hope someone can help.
    Regards
    Volterony22
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    There are 9 positions available :
    1. TL: top-left
    2. TC: top-center
    3. TR: top-right
    4. ML: middle-left
    5. MC: middle-center
    6. MR: middle-right
    7. BL: bottom-left
    8. BC: bottom-center
    9. BR: bottom-right
    If you set randomizePositions to true, it will overwrite the values you pass for each item
    startZoom: the zoom value to start with
    endZoon: the zoom value to end with
    transitionTime: the time for the slide to reach from property A to property B
    slideShowTime: the time the slide stays on screen
    disablePauseButton: it needs to be set to true if you want to have links on the slideshow
    -->
    <!--
    NOTE: The transition time must be higher than the slideshow time for each item! (make sure the difference is at least alphaTime value)
      The reason is so the zoom effect doesn't end before the transition does.
    -->
    <kenburns width = "1000" height = "348"
    backgroundColor = "0x000000"
    backgroundTransparency = "0"
    startWith = "1"
    randomSlideshow = "true"
    loop = "true"
    randomizeImagePosition = "false"
    alphaTime = "2"
    textX = "10"
    textY = "10"
    overColor = "0x000000"
    overAlpha = "20"
    disablePauseButton = "true">
    <!--
    <item>
    <title><![CDATA[<font size="16" color="#ffffff">Sand beach in the morning</font>]]></title>
    <path>content/images/image1.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>12</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>80</startZoom>
    <endZoom>100</endZoom>
    <startPosition>MC</startPosition>
    <endPosition>MC</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image2.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>25</transitionTime>
    <slideShowTime>22</slideShowTime>
    <startZoom>100</startZoom>
    <endZoom>55</endZoom>
    <startPosition>MC</startPosition>
    <endPosition>MC</endPosition>
    </item>
    <item>
    <title><![CDATA[<font size="18" color="#ffffff">Waves and wind</font>]]></title>
    <path>content/images/image3.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>27</transitionTime>
    <slideShowTime>20</slideShowTime>
    <startZoom>70</startZoom>
    <endZoom>100</endZoom>
    <startPosition>TC</startPosition>
    <endPosition>BC</endPosition>
    </item>
    <item>
    <title><![CDATA[<font size="18" color="#224F91">No words needed..</font>]]></title>
    <path>content/images/image4.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>12</transitionTime>
    <slideShowTime>9</slideShowTime>
    <startZoom>80</startZoom>
    <endZoom>80</endZoom>
    <startPosition>BL</startPosition>
    <endPosition>TR</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image5.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>35</transitionTime>
    <slideShowTime>32</slideShowTime>
    <startZoom>55</startZoom>
    <endZoom>100</endZoom>
    <startPosition>BC</startPosition>
    <endPosition>TC</endPosition>
    </item>
    -->
    <item>
    <title></title>
    <path>content/images/image6.jpg</path>
    <link>http://www.flabell.com</link>
    <target>_blank</target>
    <transitionTime>10</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>40</startZoom>
    <endZoom>35</endZoom>
    <startPosition>ML</startPosition>
    <endPosition>MR</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image7.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>20</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>70</startZoom>
    <endZoom>55</endZoom>
    <startPosition>MR</startPosition>
    <endPosition>ML</endPosition>
    </item>
    <item>
    <title></title>
    <path>content/images/image3.jpg</path>
    <link></link>
    <target>_blank</target>
    <transitionTime>20</transitionTime>
    <slideShowTime>8</slideShowTime>
    <startZoom>50</startZoom>
    <endZoom>60</endZoom>
    <startPosition>ML</startPosition>
    <endPosition>MR</endPosition>
    </item>
    </kenburns>

    Hi there,
    Thank you for responding.  When I say component, I have purchased a flash component from a company called www.flabell.com.  When you buy the component, you get the as, swf, assest, images, fla etc etc. 
    My goal is to embed this component into a flash project that I am working on at the moment which involves importing the assets/resources from the flabell component folder into the library of my current flash project.
    My folder structure at the moment is that I have top level folder call project.  In this folder is my actual flash project folder and the flabell component folder.  So no the html that embeds my main swf is not in the same folder as my 3 party swf - they are in two different locations.  However should this be an issue if I am importing the xml into my main project library anyway?
    Hope this info shines more light.
    Regards
    volterony22

  • Problem to display a negative number in XML Publisher output in excel

    Hi All,
    I am facing problem in displaying a negative number in XML Publisher output in excel.
    My requirement is that I have to display a negative number in brackets when the output is taken in excel format. Eg: If the value is -123 then i have to display it as (123).
    I have put these brackets using a formula column in the RDF, but it is the default functionality of excel that whenever there is a number in brackets then it automatically displays that as a negative value.
    Can anyone please help me how I can display this negative number within brackets and not as a negative digit. Is there any special tag or is there any formula which can be used to convert this into text and written in the Help text of RTF template.
    This is very urgent. If someone knows please reply asap.
    Regards,
    Shruti

    This is very urgent. If someone knows please reply asap.We are all volunteers here, so no ones questions are more urgent then other ones.
    If its that urgent it would have helped if you had chosen the correct forum to ask your question BI Publisher

  • How to convert this Servlet into JSP

    I am trying to convert this Servlet into JSP page.
    How do I go about doing this?
    Thanks.
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    /** Shows all items currently in ShoppingCart. Clients
    * have their own session that keeps track of which
    * ShoppingCart is theirs. If this is their first visit
    * to the order page, a new shopping cart is created.
    * Usually, people come to this page by way of a page
    * showing catalog entries, so this page adds an additional
    * item to the shopping cart. But users can also
    * bookmark this page, access it from their history list,
    * or be sent back to it by clicking on the "Update Order"
    * button after changing the number of items ordered.
    * <P>
    * Taken from Core Servlets and JavaServer Pages 2nd Edition
    * from Prentice Hall and Sun Microsystems Press,
    * http://www.coreservlets.com/.
    * &copy; 2003 Marty Hall; may be freely used or adapted.
    public class OrderPage extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    HttpSession session = request.getSession();
    ShoppingCart cart;
    synchronized(session) {
    cart = (ShoppingCart)session.getAttribute("shoppingCart");
    // New visitors get a fresh shopping cart.
    // Previous visitors keep using their existing cart.
    if (cart == null) {
    cart = new ShoppingCart();
    session.setAttribute("shoppingCart", cart);
    String itemID = request.getParameter("itemID");
    if (itemID != null) {
    String numItemsString =
    request.getParameter("numItems");
    if (numItemsString == null) {
    // If request specified an ID but no number,
    // then customers came here via an "Add Item to Cart"
    // button on a catalog page.
    cart.addItem(itemID);
    } else {
    // If request specified an ID and number, then
    // customers came here via an "Update Order" button
    // after changing the number of items in order.
    // Note that specifying a number of 0 results
    // in item being deleted from cart.
    int numItems;
    try {
    numItems = Integer.parseInt(numItemsString);
    } catch(NumberFormatException nfe) {
    numItems = 1;
    cart.setNumOrdered(itemID, numItems);
    // Whether or not the customer changed the order, show
    // order status.
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Status of Your Order";
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>");
    synchronized(session) {
    List itemsOrdered = cart.getItemsOrdered();
    if (itemsOrdered.size() == 0) {
    out.println("<H2><I>No items in your cart...</I></H2>");
    } else {
    // If there is at least one item in cart, show table
    // of items ordered.
    out.println
    ("<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
    "<TR BGCOLOR=\"#FFAD00\">\n" +
    " <TH>Item ID<TH>Description\n" +
    " <TH>Unit Cost<TH>Number<TH>Total Cost");
    ItemOrder order;
    // Rounds to two decimal places, inserts dollar
    // sign (or other currency symbol), etc., as
    // appropriate in current Locale.
    NumberFormat formatter =
    NumberFormat.getCurrencyInstance();
    // For each entry in shopping cart, make
    // table row showing ID, description, per-item
    // cost, number ordered, and total cost.
    // Put number ordered in textfield that user
    // can change, with "Update Order" button next
    // to it, which resubmits to this same page
    // but specifying a different number of items.
    for(int i=0; i<itemsOrdered.size(); i++) {
    order = (ItemOrder)itemsOrdered.get(i);
    out.println
    ("<TR>\n" +
    " <TD>" + order.getItemID() + "\n" +
    " <TD>" + order.getShortDescription() + "\n" +
    " <TD>" +
    formatter.format(order.getUnitCost()) + "\n" +
    " <TD>" +
    "<FORM>\n" + // Submit to current URL
    "<INPUT TYPE=\"HIDDEN\" NAME=\"itemID\"\n" +
    " VALUE=\"" + order.getItemID() + "\">\n" +
    "<INPUT TYPE=\"TEXT\" NAME=\"numItems\"\n" +
    " SIZE=3 VALUE=\"" +
    order.getNumItems() + "\">\n" +
    "<SMALL>\n" +
    "<INPUT TYPE=\"SUBMIT\"\n "+
    " VALUE=\"Update Order\">\n" +
    "</SMALL>\n" +
    "</FORM>\n" +
    " <TD>" +
    formatter.format(order.getTotalCost()));
    String checkoutURL =
    response.encodeURL("../Checkout.html");
    // "Proceed to Checkout" button below table
    out.println
    ("</TABLE>\n" +
    "<FORM ACTION=\"" + checkoutURL + "\">\n" +
    "<BIG><CENTER>\n" +
    "<INPUT TYPE=\"SUBMIT\"\n" +
    " VALUE=\"Proceed to Checkout\">\n" +
    "</CENTER></BIG></FORM>");
    out.println("</BODY></HTML>");
    }

    Sorry.
    actually this is my coding on the bottom.
    Pleease disregard my previous coding. I got the different one.
    My first approach is using <% %> around the whole doGet method such as:
    <%
    String[] ids = { "hall001", "hall002" };
    setItems(ids);
    setTitle("All-Time Best Computer Books");
    out.println("<HR>\n</BODY></HTML>");
    %>
    I am not sure how to break between code between
    return;
    and
    response.setContentType("text/html");
    Here is my coding:
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
         String[] ids = { "hall001", "hall002" };
         setItems(ids);
         setTitle("All-Time Best Computer Books");
    if (items == null) {
    response.sendError(response.SC_NOT_FOUND,
    "Missing Items.");
    return;
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>");
    CatalogItem item;
    for(int i=0; i<items.length; i++) {
    out.println("<HR>");
    item = items;
    if (item == null) {
    out.println("<FONT COLOR=\"RED\">" +
    "Unknown item ID " + itemIDs[i] +
    "</FONT>");
    } else {
    out.println();
    String formURL =
    "/servlet/coreservlets.OrderPage";
    formURL = response.encodeURL(formURL);
    out.println
    ("<FORM ACTION=\"" + formURL + "\">\n" +
    "<INPUT TYPE=\"HIDDEN\" NAME=\"itemID\" " +
    " VALUE=\"" + item.getItemID() + "\">\n" +
    "<H2>" + item.getShortDescription() +
    " ($" + item.getCost() + ")</H2>\n" +
    item.getLongDescription() + "\n" +
    "<P>\n<CENTER>\n" +
    "<INPUT TYPE=\"SUBMIT\" " +
    "VALUE=\"Add to Shopping Cart\">\n" +
    "</CENTER>\n<P>\n</FORM>");
    out.println("<HR>\n</BODY></HTML>");

Maybe you are looking for

  • Does not recognize printer

    Just got my G4 (9.2.2) back with new power supply. Decided to set it up on it's own with only a HP LaserJet 2100TN attached via Ethernet cable. Was previously setup on network with other computers via hub, router etc. Chooser does not see my HP print

  • 10.6.8 Finder keeps crashing/hanging

    Hi. I'm running 10.6.8, Mac Pro Dual-Core Intel Xeon. (purchased June 2007) Problems started about a month or so ago when my finder crashed a few times, and my external HD dismounted. This happened a few times, then my ex HD totally fried (corrupted)

  • Using a digital signature-base method to get tcUtilityFactory

    In OIM API usage guide it is sais that: "The entity using the APIs must maintain security of the private key for the signature. The private key is the basis for establishing trust between the two systems. Oracle Identity Manager must also know what c

  • File save as in Forms6i

    I understand from other topics here, that i would need d2kwutil.pll to use the win_api_dialog.save_file function. Well i am using forms6i, so does anyone know the equivalent of this pll in Forms6i. I have used D2tx, which i found along with bankapp a

  • OH CRAP! iPhoto unexpectedly quits.

    Hello, my iPhoto application has been unexpectedly quitting on me, everytime I start it up. Last night my sister just accidentaly unplugged the power cord to my iMac, when she hooked up her digital camera to my computer. I then rebooted my Mac and th