Re: Need help to generate critical report



On Tue, 29 Apr 2008 09:41:35 -0700 (PDT), pooja.shirwalkar@xxxxxxxxx
wrote:

I have a critical requirement where I need to club together 4 xml
files and display them in an sibngle HTML report. The xmls are
generated by Java application by a normal file I/O.

Is there a way I can club them together in a presentable format for
reporting purpose ?
Yes.


So for .g. a.xml, b.xml, c.xml and d.xml. These xmls I want to display
in an html report say report.html in a 4 columns in java.
Yes. Use an HTML table with four columns. Format each XML element
into the next cell of the appropriate column. Generate the HTML as
text from within Java.

<html>
<head>
<title>Table Demo</title>
</head>
<body>
<h1>Table Demo</h1>
<table>
<tr>
<th>Column One Header</th>
<th>Column Two Header</th>
<th>Column Three Header</th>
<th>Column Four Header</th>
</tr>
<tr>
<td>C1 Row One</td>
<td>C2 Row One</td>
<td>C3 Row One</td>
<td>C4 Row One</td>
</tr>
<tr>
<td>C1 Row Two</td>
<td>C2 Row Two</td>
<td>C3 Row Two</td>
<td>C4 Row Two</td>
</tr>
<tr>
<td>C1 Row Three</td>
<td>C2 Row Three</td>
<td>C3 Row Three</td>
<td>C4 Row Three</td>
</tr>
</table>
</body>
</html>


It is difficult to be more specific without knowing more about the
XML.



Please help.

Cheers
Nick

.



Relevant Pages

  • Re: Recommendations for a web application framework?
    ... Yet I still see this duality wherein there's a Java class representing the form. ... you can not eliminate this duality if you want to use HTML templates and insert a value into a specific position in the template. ... To be perhaps a little clearer, what JSF does is ensure that the correspondence between identifiers and names in Java code and HTML content is one-way. ... Java may have a verbose syntax, but it's still much better than XML, especially with a decent IDE. ...
    (comp.lang.java.programmer)
  • Re: Inhaltstyp eines Strings
    ... Typen sind normaler Wiki-Text, Java, XML, HTML oder allgemeine ... kommen auch nur Fragmente, wie im zweiten und vierten Beispiel. ...
    (de.comp.lang.java)
  • Re: Using Java to produce HTML like a php script
    ... >I am a university student using a program that requires updated xml ... > described is going to be in java if possible). ... If you're simply looking to generate HTML within a Java program, ... It is also possible to use something called XSL to convert XML documents to ...
    (comp.lang.java.programmer)
  • Re: clueless student trying to parse XML
    ... html is not always parseable by an xml parser. ... regarding html are less strict than xml, which means valid HTML is not ... Java book, and use online resources. ...
    (comp.lang.java.programmer)
  • Need help to generate critical report
    ... I have a critical requirement where I need to club together 4 xml ... in an html report say report.html in a 4 columns in java. ...
    (comp.lang.java.gui)