on 06-28-2012 12:34 PM
Hi All,
I have create jsp page to display grid from xml data. Below i have displayed my jsp(parsing jsp
) page and xml (display.xml)page.
parsing.jsp
<%@ page contentType="text/html"%>
<%@ page import="javax.xml.parsers.DocumentBuilderFactory,
javax.xml.parsers.DocumentBuilder,org.w3c.dom.*"
%>
<%
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse("http://10.100.133.106:50000/XMII/CM/Glory/Sample/display.xml");
NodeList nl= doc.getElementsByTagName("title");
NodeList n2= doc.getElementsByTagName("author");
NodeList n3= doc.getElementsByTagName("year");
NodeList n4= doc.getElementsByTagName("price");
%>
<html>
<body><center>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="background:#000033;color:#FFFFFF;font-weight:bold;">Title</td>
<td style="background:#000033;color:#FFFFFF;font-weight:bold;">Author</td>
<td style="background:#000033;color:#FFFFFF;font-weight:bold;">Year</td>
<td style="background:#000033;color:#FFFFFF;font-weight:bold;">Price</td>
</tr>
<tr>
<%
for(int i=0;i<3;i++)
{
%>
<td><%= nl.item(i).getFirstChild().getNodeValue() %></td>
<td><%= n2.item(i).getFirstChild().getNodeValue() %></td>
<td><%= n3.item(i).getFirstChild().getNodeValue() %></td>
<td><%= n4.item(i).getFirstChild().getNodeValue() %></td>
</tr>
<%
}
%>
</table>
</center>
</body>
</html>
display.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
While executing am getting following Error report.
Error: "Application error occurred during the request processing."
Troubleshooting Guide https://sdn.sap.com/irj/sdn/wiki?path=/display/JSTS/Home
Details:
|
But xml data is well confirmed. Please solve this issue
Regards,
Glory
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Add one Assignment action under XML_Saver_0 or on that sequence. Then map your Document output to your OutputXML in transaction properties which is of output parameter. Now values should display in your Xacute query.
You can find these steps in MII sample projects also, pls refer that.
Regards,
Aravinth
Hi Aravinth
I have tried using iGrid display template but i dint get any data in iGrid so onlly i have created page to display it
Regards
Glory
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just try to create an iGrid to display your xml output in screen. There is lot of posts regarding iGrid, just go through it. Or help document will also give a clear picture about iGrid.
Regards,
Aravinth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.