Write XML to a file; Pass to BI Publisher?

Hello!
I originally posted this to the APEX forum but this is really a BIP question since what I'm asking would take APEX out of the picture.
Is it possible to generate an .xml file myself, then use that file to create a BI Publisher report? I'd like to bypass using a APEX's Report Query option to generate an .xml file that is used to create a BIP report.
Thank you,
Tammy

Hi,
You can use the XML file You generated as Source.
You Have to create a Datasource under
Admin>File
Create a New data Source
Give the name and the File location.
While creating a report in the Datamodel select the Source as FILE.

Similar Messages

  • How to write xml doc to file in PL/SQL

    I have a function defined that uses xmlgen.getxml to generate an xml confirmation document. I am calling this function from a trigger and would like to have the returned xml document (a clob) written to an OS file. Can anyone help me with this issue?
    Thanks,
    John

    declare
    TYPE weak_cursor_type is REF CURSOR;
    curOUT weak_cursor_type;
    vOUT clob;
    begin
    open curOUT FOR SELECT xmlgen.getXML('select * from all_users',1) XML_TXT FROM DUAL;
    fetch curOUT into vOUT;
    sp_gen_util.output_clob(vOUT,80,'file');
    sp_gen_util.output_str(vOUT, 250, 'screen');
    end;
    ----part of package sp_gen_util----
    ------------- package variables --------------
    SUBTYPE max_str_type is varchar2(32767);
    wk_CR char:=chr(10);
    MAX_STR_LEN constant number:= 32767;
    --- driver routine. calls "open_file_function"
    --- and "LOBPrint"
    --- assumptions: that UTL_DIR has been set in INIT.ORA
    --- to support any directories passed
    --- inputs: CLOB for output
    --- line_length (only affects screen output just now)
    --- destination (currently allows "screen" and "file")
    --- file_status ("a" append, "w" open for write)
    --- dirname (directory path for file)
    --- filename (file name for write or append)
    PROCEDURE output_clob (
    p_str clob,
    p_line_length number DEFAULT 80,
    p_destination varchar2 DEFAULT 'screen',
    p_status varchar2 DEFAULT 'a',
    p_dirname varchar2 DEFAULT '/tmp',
    p_filename varchar2 DEFAULT 'write_host_file.log' ) IS
    v_outfile utl_file.file_type;
    begin
    wk_substr_len:=p_line_length;
    if p_destination='file' then
    v_outfile := open_file_fun(p_status, p_dirname, p_filename);
    end if;
    LOBPrint(p_str,p_destination,v_outfile);
    if p_destination='file' then
    utl_file.fclose(v_outfile);
    end if;
    end output_clob;
    --- loops through blocks of text by delimiter (carriage return)
    --- and writes to either the screen or file
    --- (output to screen needs work for clob...currently using
    --- "output_str" instead for <32k strings instead)
    --- inputs: CLOB for output
    --- destination (currently allows "screen" and "file")
    --- filehandle (open filehandle from openfile routine)
    PROCEDURE LOBPrint(
    p_str clob,
    p_destination varchar2,
    v_outfile utl_file.file_type default null ) is
    ---------------local working variables
    wk_str max_str_type; --MAX=32767
    wk_offset INTEGER := 1;
    wk_clob clob;
    wk_clob_len number;
    wk_clob_len2 number;
    wk_max_loops number:=70000;
    begin
    wk_clob_len:= dbms_lob.getlength(p_str);
    if wk_clob_len <= MAX_STR_LEN
    and p_destination='file' then
    --- NOTE: dbms_lob.substr parameters are OPPOSITE of sql substr
    utl_file.put_line(v_outfile, dbms_lob.substr( p_str, wk_clob_len, 1));
    elsif wk_clob_len > MAX_STR_LEN then
    dbms_lob.createtemporary(wk_clob, TRUE, dbms_lob.call);
    --- wk_clob: LOB locator of the copy target.
    --- p_str: LOB locator of source for the copy.
    --- wk_clob_len: Number of bytes (for BLOBs) or characters (for CLOBs)
    --- to copy.
    --- 1: Offset in bytes or characters in the destination LOB
    --- (origin: 1) for the start of the copy.
    --- 1: Offset in bytes or characters in the source LOB
    --- (origin: 1) for the start of the copy.
    dbms_lob.copy(wk_clob, p_str, wk_clob_len, 1, 1);
    LOOP
    wk_str:=word_parse_trim_lob_FUN(wk_clob,wk_CR);
    if p_destination='file' then
    utl_file.put_line(v_outfile, wk_str);
    elsif p_destination='screen' then
    dbms_output.put_line(wk_str);
    end if;
    wk_clob_len2:= dbms_lob.getlength(wk_clob);
    EXIT WHEN wk_clob is null ;
    END LOOP;
    end if;
    END LOBPrint;
    --- "function with side-effect"
    --- input is CLOB, with is "returned" without leading field
    --- additional parameter is field (or token) delimiter
    --- value returned is leading field from input string
    FUNCTION word_parse_trim_lob_FUN(o_str IN OUT NOCOPY clob,
    p_delimiter IN varchar2) RETURN varchar2
    IS
    o_token max_str_type;
    clob_len number;
    next_pos number;
    wk_clob clob;
    BEGIN
    clob_len:= dbms_lob.getlength(o_str);
    next_pos:= dbms_lob.instr(o_str, p_delimiter, 1, 1);
    if next_pos != 0 then
    -- NOTE: dbms_lob.substr parameters are OPPOSITE of sql substr
    dbms_lob.createtemporary(wk_clob, TRUE, dbms_lob.call);
    o_token:= dbms_lob.substr( o_str, next_pos-1, 1);
    -- o_str:= dbms_lob.substr(o_str,clob_len-next_pos,next_pos+1);
    if next_pos = clob_len then
    wk_clob := null;
    else
    --- wk_clob: LOB locator of the copy target.
    --- o_str: LOB locator of source for the copy.
    --- clob_len: Number of bytes (for BLOBs) or characters (for CLOBs)
    --- to copy.
    --- 1: Offset in bytes or characters in the destination LOB
    --- (origin: 1) for the start of the copy.
    --- next_pos+1: Offset in bytes or characters in the source LOB
    --- (origin: 1) for the start of the copy.
    dbms_lob.copy(wk_clob, o_str, clob_len, 1, next_pos+1);
    end if;
    else
    o_token:= dbms_lob.substr( o_str, MAX_STR_LEN, 1);
    end if;
    o_str := wk_clob;
    RETURN(o_token);
    EXCEPTION
    when others then
    null;
    -- dbms_output.put_line('Error:'||SQLCODE||',text:'||SQLERRM);
    END word_parse_trim_lob_FUN;

  • Anyone have example to read and write XML to/from file

    I am writing a swing utility and need to save and read data in XML. I have looked around google, but the examples are just confusing me.
    Jonathan

    Do these xml docs have dtd's? And specific DOM implementation needs or just a custom xml?
    I have some examples in http://cvs.sourceforge.net/viewcvs.py/mathml-x/mathml-x/src/com/neuralworks/physics/Academy.java?view=markup
    follow openMenuItemActionPerformed and openFEMMLDocument(String filePath). Look for DocumentBuilder
                DocumentBuilderFactory factory =
                DocumentBuilderFactory.newInstance();
    /*            factory.setAttribute("element.factory",
                                     ELEMENT_FACTORY);
                factory.setAttribute("attribute.factory",
                                     ATTR_FACTORY);
                DocumentBuilder builder = factory.newDocumentBuilder();
                //builder.setEntityResolver(new X3DEntityResolver());
                //builder.setErrorHandler(new X3DErrorHandler());
                femDoc = findXMLFile(builder, filePath);
                org.w3c.dom.Element docElement=femDoc.getDocumentElement();
                javax.swing.tree.DefaultMutableTreeNode dmtn=new javax.swing.tree.DefaultMutableTreeNode("FEMML");
                javax.swing.tree.DefaultMutableTreeNode svgChild=new javax.swing.tree.DefaultMutableTreeNode(docElement.getNodeName());
                //System.out.println(svgDocument.getTitle()+" nv "+svgSVGElement.getNodeValue());
                //recurseDOM2TreeNodes(svgChild, docElement.getChildNodes());
                dmtn.add(svgChild);
                JTree tree=new JTree(new javax.swing.tree.DefaultTreeModel(dmtn));
                tree.setRootVisible(true);
                tree.setShowsRootHandles(true);
                tree.setEditable(true);
                //try
                    //X3DTreeAdapter x3dTreeAdapter=new X3DTreeAdapter(x3dDTDParser.parse());
                    //org.web3d.x3d.dom.swing.DOMTreeCellEditor domTreeCellEditor=new org.web3d.x3d.dom.swing.DOMTreeCellEditor();
                    //tree.setCellEditor(domTreeCellEditor);
                    //org.web3d.x3d.dom.swing.DOMTreeCellRenderer domTreeCellRenderer=new org.web3d.x3d.dom.swing.DOMTreeCellRenderer();
                    //domTreeCellRenderer.addMouseListener(x3dTreeAdapter);
                    //domTreeCellRenderer.addMouseMotionListener(x3dTreeAdapter);
                    //tree.setCellRenderer(domTreeCellRenderer);
                    //tree.addMouseListener(x3dTreeAdapter);
                    //tree.addMouseMotionListener(x3dTreeAdapter);
                    academicSplitPane.setLeftComponent(new JScrollPane(tree));Lot of commented out stuff I need to clean up. There are other examples of opening specific xml docs that have special DOM implementations; svg and mathml for example.
    For saving I use xslt with an identity transform to go from an in memory DOM source to an xml document on disk.
    Follow the saveAs(String filePath) method and the identity.xsl is http://cvs.sourceforge.net/viewcvs.py/mathml-x/mathml-x/stylesheets/identity.xsl?rev=1.2&view=markup

  • OSB XML to Flat file(write)- MFL?

    Hi,
    OSB 11G
    I will be invoking the db to get XML data and I have to write to a text file(pipe delimiter).
    I saw below forum, but I am not sure how to create MFL .Can you anyone pls mention the steps. (MFL ->XML to flat file )
    Do I have import xsd in Native Builder and convert to a flat file with pipe delimiter ?
    How to write a CSV file in OSB
    Thanks
    Edited by: soauser on Jul 7, 2011 8:07 PM

    truth must be said, MFL is very sensitive to input data, any deviation from the contract is punished with a NullPointerException, especially when the input is in binary format. One would expect a better error message, but what can we do.
    Make sure your input data complies with the Schema, for instance do a xsd validation...

  • 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);
    }

  • Unparsing a DOM tree and write XML to file

    Hi,
    I have created a DOM tree from scratch and would like to unparse the DOM tree and write the XML to a file, but how do I do that?
    Does anybody got code examples that do this?
    All help are very appreciated!
    /Daniel

    Thank you very much for the hint! Unfortunaly I still got problem to get it work though.
    I made a little piece of test code to try it but during the execution of the "Transformer.transform(source,result)" method I gets an "org.w3c.dom.DOMException".
    Does anybody see what that problem might be cause of by exmining the code below?
    I also would like to know how to specify the location where I would like to print out the XML file.
    Here is my little piece of test code:
    try{
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFadctory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    Document doc = docBuilder.newDocument();
    doc.appendChild(doc.createElement("topLevel"));
    Element elm = doc.getDocumentElement();
    elm = (Element)elm.appendChild(doc.createElement("PersonData"));
    elm = (Element)elm.appendChild(doc.createElement("Name"));
    elm.setAttribute("Firstname","D");
    elm.setAttribute("Lastname", "D");
    DOMResult result = new DOMResult(doc);
    DOMSource source = new DOMSource(doc);
    TransformerFactory transformerFactory = TansformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.transform(source,result);
    }catch(ParserConfigurationException e) {
    }catch(IOException e) {
    }catch(TransformerException te) {

  • Can Sax not write xml file?Thanks!

    Thanks!

    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html
    this example just writes the xml to System.out. it's not hard to write the xml to a file instead.

  • How to write adapter module to convert the xml to pdf file

    Hi all,
      how to write adapter module to convert the xml to pdf file.
    Please any body assist step by step procedure.

    PI 7.1 XML to PDF transformation
    have you seen below links:
    http://forums.sdn.sap.com/thread.jspa?threadID=1212478
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/14363

  • File Adapter write XML file with special characters

    Hi,
    I have a BPEL processes which use DB adapter to retrieve record and output in a XML document using File Adapter.
    In the table, some records contain these special characters - ">" , "<" , "." . I was expecting the file adapter will convert it to escape characters, but it didn't happen. it just put the same value back to the XML file, which cause other system to reject the file. Do anyone know how to resolve this ?
    The version of SOA is 10.1.3.4
    Thanks for the help.
    Calvin
    Edited by: user12018221 on May 25, 2011 1:48 PM

    one option is to specify validateXML on the partnerlink (that describes the file adapter endpoint) such as shown here
    <partnerLinkBinding name="StarLoanService">
    <property name="wsdlLocation"> http://<hostname>:9700/orabpel/default/StarLoan/StarLoan?wsdl</property>
    <property name="validateXML">true</property>
    </partnerLinkBinding>
    hth clemens

  • Cluster and Read Write XML

    In my applications I allow users to save their settings. I used to do this in a Ini file. So I wrote a Vi that could write any cluster and it worked ok. When I discovered that in the newer versions of LabVIEW you could Read/Write From/To xml, I changed inmediatly because it have some advantages form me but I am having some trouble.
    Every time I want to save a cluster I have to use
    Flatten To XML -> Escape XML -> Write XML
    and to load
    Load From XML -> Unescape XML -> Unflatten from XML.
    I also do other important things each time I save or load settings. So it seems to be reasonable to put all this in just two subvi's. (One for loading, One for saving). The problem is that I want to use it with any cluster
    What I want with can be summarized as following:
    - SaveSettings.vi
    --Inputs:
    ---Filename
    ---AnyCluster
    ---Error In
    --Outputs
    ---Error Out
    -LoadSettings.vi
    Inputs:
    ---Filename
    ---AnyCluster
    ---Error In
    Outputs
    ---DataFromXML
    ---Error Out
    I have tried using variants or references and I was not able to make generic sub vi (sub vi that don't know what is in the cluster). I don't want to use a polymorphic vi because it will demand making one load/save pair per each type of settings.
    Thanks,
    Hernan

    If I am correct you still you need to wire the data type to the Variant To Data. How can you put in a subvi ALL that is needed to handle the read/write of the cluster? I don't want to put any Flatten To XML or Unflatten From XML outside.
    The solution I came out with INI files was passing a reference to a cluster control but it is real unconfortable because I have to itereate through all items.
    When a control has a "Anything" input, is there any way to wire that input to a control and remains "Anything"?
    Thanks
    Hernan

  • Java.util.logging: write to one log file from many application (classes)

    I have a menuapp to launch many applications, all running in same JVM and i want to add logging information to them, using java.util.logging.
    Intention is to redirect the logginginfo to a specific file within the menuapp. Then i want all logging from all applications written in same file. Finally, if needed (but i don't think it is), i will include code to write logging to specific file per app (class). The latter is probably not neccessary because there are tools to analyse the logging-files and allow to select filters on specific classes only.
    The applications are in their own packages/jars and contain following logging-code:
            // Redirect error output
            try {
                myHandler = new FileHandler("myLogging.xml",1000000,2);
            } catch (IOException e) {
              System.out.println("Could not create file. Using the console handler");
            myLogger.addHandler(myHandler);
            myLogger.info("Our first logging message");
            myLogger.severe("Something terrible happened");
            ...When i launch the menuapplication, it writes info to "myLogging.xml.0"
    but when i launch an application, the app writes info to "myLogging.xml.0.1"
    I already tried to leave out the creation of a new Filehandler (try/catch block in code above) but it doesn't help.
    Is it possible to write loginfo to same specific file?

    You should open/close it somehow at every write from different processes.
    But I personally prefer different file names to your forced merging, though.

  • How to write a CLOB to file using UTF-8

    I'm new to java and I have the following problem.
    I need to write a CLOB to file using the UTF-8 characterset (I'm generating an xml file). My database characterset is WE8ISO8859P15.
    I've tried the code below but the resulting output fails validation in an xml editor due to an 'invalid character' error :
    create or replace
    and compile
    java source named "ClobUtil"
    as
    import java.io.*;
    import java.lang.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.*;
    public class ClobUtil {
    public static void save(CLOB clob, String filename) throws Exception
    Connection conn = DriverManager.getConnection("jdbc:oracle:kprb:");
    conn.setAutoCommit(false);
    InputStream is = clob.getCharacterStream();
    FileOutputStream os = new FileOutputStream(filename);
    int size = clob.getChunkSize();
    byte buffer[] = new byte[size];
    int length;
    while ((length = is.read(buffer, 0, size)) != -1) {
    os.write(buffer, 0, length);
    is.close();
    os.close();
    conn.close();
    I see that the getCharacterStream() method returns a Unicode character stream but how do I output this to file ??
    Thanks in advance

    File file = new File( "myfile.utf8" );
    FileOutputStream fos = new FileOutputStream( file );
    OutputStreamWriter osw = new
    OutputStreamWriter( fos, "UTF8" );
    Writer w = new BufferedWriter( osw );
    PrintWriter out = new PrintWriter( w );
    Or whatever you need. Note that this merely allows you to specify the encoding to be used in the output file, it does convert the encoding for you. I think in your case this will work since you already know the output stream will not contain the full range of UTF8 characters anyway.

  • MICR font not displayed in PDF on SUSE Linux Server for Check Writer (XML)

    We are generating checks by running the Check Writer(XML) concurrent request and are not able to see MICR fonts on the Check. We downloaded the free version from IDAutomationSMICR.ttf and the fonts were registered under /usr/local/fonts/micr directory. I registered in APPS and uploaded the file IDAutomationSMICR.ttf. Am I missing any steps. The DBA's have registered the fonts under /usr/local/fonts/micr on SUSE Linux Server . The custom Checks are generated but no luck with the fonts. Please advise. Can I download MICR fonts other than IDAutomation site? Appreciate your response.
    Thanks,
    Hari

    I use version 11i, so the steps are probably different. Download a font file (gnuMICR for me). Extract it to a location of your choice on your operating system.
    Follow these steps to load the MICR font to the server. (Step 11 was missing in some of the metalink documents in late 2007. I think Jan. 2008 will be OK).
    1.     Log in as XML Publisher Administrator.
    2.     Navigate to Administration->Font Files->Create Font File.
    3.     Fields are Font Name and File. For Font Name choose any descriptive name. File will browse your PC to locate the font file.
    4.     Navigate to Font Mappings->Create Font Mapping Set.
    5.     Mapping name is the name you will give to a set of fonts. [MICR Font]
    6.     Mapping code is the internal name you will give to this set. [MICR]
    7.     Type: 'PDF Form' for PDF templates. 'FO to PDF' for all other template types.
    8.     Create Font Mapping (this allows you to add multiple fonts to a set).
    9.     Font Family is the exact same name you see in Word under Fonts. If you don't use the same name the font will not be picked up at runtime. [GnuMICR]
    10.     Style and weight must also match how you use the font in Windows. Normal and Normal are good defaults. [Normal, Normal]
    11.     DO NOT enter Language or Territory
    12.     Choose a value for Font Type. [Truetype]
    13.     Search for the Font you just created in step 3. [GnuMICR]
    14.     Navigate to Configuration -> FO Processing -> Font Mapping Set. Can also be done at data def and template level under Edit Configuration. Hierarchy is Site-> Data Def -> Template.
    15.     Select your new mapping set.
    16.     Make sure the font is not referenced under File->Properties->Custom in the RTF template file.
    17.     Select a temporary directory on your concurrent processing node (Configuration -> General). This needs to be a private area not shared by other processes, read writeable by the applmgr (owner of the $APPL_TOP file system). It should be fairly large 5 GB or 20x larger than any datafile being used. The fonts will be downloaded here the first time they are used.
    18.     Also at this site level select your font mapping set.
    19.     Upload a template that uses your special font and test using preview.

  • Correlate XML and PDF file/mail

    Following ugly requirement: PI receives XMLfiles and mails with PDF attachment. The XML contains the plain invoice data, the PDF is the signed invoice. PI sends both types as files to the customer. But the customer wants that files which belong together (see below) are sent within a time interval of max. 6 hours.
    Problem is, the PDF is signed by an external partner which may need longer than those 6 hours. And the supplier is not able to hold back the corresposing XML files.
    I fear the only way to solve it is by integration process (?)
    The XML has a file reference tag, which corresponds to the mail attachment name, so in theory, we know what fits together. But the PDF is a binary message, so how to definine a correlation definition on it ? Do I need to map the PDF into an own XML structure, e.g. some header tag which contains the attachment name, and a base64 tag which contains the PDF ? But then I would later have to recreate the binary PDF, after the 2 messages are correlated. Is that possible in the process ? Can I map message 2 again when it leaves the process ?
    We are on PI 7.0, soon 7.1
    CSY

    Additional info: I just implemented the solution with 2 receiver interfaces. And write both messages with file reveiver channels, one of them uses the PayloadSwapBean. Works great. The solution is better than the zip option, because now I can even set the filename as I want:
    1. for the XML file, I can just use the adapter specific attribute filename (= use the name of the original XMLfile)
    2. for the PDF file, this does not work without additional change because it was read as attachment with the XML file, and so gives the name of the XML file, and the original PDF filename is not in the PI message anymore. But I just add a Java mapping in the routing of the PDF file, and set the needed filename value in dynamic configuration (read the value, remove .xml and append .pdf)
    CSY

  • Xml save to file

    hi all. I have here a jsp code that generates XML.. how can i save the XML output to file instead of displaying it to the browser? pls. help. thanks.
    <%@ page contentType="text/xml" %>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <report>
         <header>
              <title>TRANSACTIONS</title>
              <description>PER COMPANY, BY PREMIUM TYPE</description>
              <period>session.getAttribute("dateCreatedToPrint")</period>
         </header>
    <table>
              <c:forEach var="transactionDetails" items="${listOfAllTransactionDetails}">
                   <transaction>
                        <company><c:out value="${transactionDetails.orgaName}" escapeXml="false" /></company>
                        <prem1><c:out value="${transactionDetails.premAmountType1}" escapeXml="false" /></prem1>
                        <prem2><c:out value="${transactionDetails.premAmountType2}" escapeXml="false" /></prem2>
                        <prem3><c:out value="${transactionDetails.premAmountType3}" escapeXml="false" /></prem3>
    </transaction>
              </c:forEach>
              <totals>
                   <total>Total</total>
                   <total1><c:out value="${subTotals.subtotal1}"/></total1>
                   <total2><c:out value="${subTotals.subtotal2}"/></total2>
                   <total3><c:out value="${subTotals.subtotal3}"/></total3>
    </totals>
    </table>
    </report>

    hi. i got the ff error when i added the code above. to which does "document" refer to? why does the Writer cannot be resolved eventhough i imported java.io.*?
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 39 in the jsp file: /jsp/summaryOfTransactionsReport.jsp
    document cannot be resolved
    36:                               javax.xml.transform.TransformerFactory tfactory = TransformerFactory.newInstance();
    37:                               javax.xml.transform.Transformer xform = tfactory.newTransformer();
    38:
    39:                               javax.xml.transform.Source src = new DOMSource(document);
    40:                               java.io.StringWriter writer = new StringWriter();
    41:                               StreamResult result = new javax.xml.transform.stream.StreamResult(writer);
    42:
    An error occurred at line: 55 in the jsp file: /jsp/summaryOfTransactionsReport.jsp
    writer cannot be resolved
    52:                          }
    53:
    54:      Writer output = null;
    55: String text = writer.toString();
    56: File file = new File("myxml.xml");
    57: output = new BufferedWriter(new FileWriter(file));
    58: output.write(text);
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         web.cocafReport.servlet.GenerateCocafReportServlet.doPost(GenerateCocafReportServlet.java:51)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Maybe you are looking for

  • Problem with WIFI in Ipod touch

    Hello, I have a problem just today, the day before ipod touch worked fine. Today I want to download some app. and then when I click on app button the screen show Loading... and just a few second it said *"cannot retrieve download information. please

  • Video out not working

    So, the audio is working fine, and the video is fine on my brother's iPod video, but the video on my iPod touch isn't working at all. What can I do to fix this?

  • Replacing Type and Creator in InDesign Mac

    Hello Everyone: Our plant uses a process that FTPs InDesign files to Unix servers for storage and then FTPs them back down to local Macs for work. In the process the file is stripped of filetype and creator. I have been tasked with writing a module t

  • Finder pathname display cluttered due to triangles and folder icons.

    For many years now I have been perturbed by the pathnames displayed at the bottom of the finder window.  Instead of following standard Unix conventions and seperating each pathname component with a slash, each is separated by a GUI-like representatio

  • Downloading Adobe Flash Builder

    How to dowload Adobe Flash Builder 32 bit version, when i'm using 64 bit version of windows. In adobe creative cloud i don't have posibility to choose version.