This week's book giveaway is in the Open Source Projects forum.
We're giving away four copies of Eclipse Collections Categorically: Level up your programming game and have Donald Raab on-line!
See this thread for details.

Palani Kumar

Greenhorn
+ Follow
since May 28, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Palani Kumar

You can use any technology. But actually original xml string is too big. So I cant use array concept here. So I thought its better to use XSLT. Any of your suggestion is welcome.
No here we have to use XSLT . So please move it to xml .
How to sort the xml string.. Please help me... Here is the code... I want to sort the xml string based on num tag...
Thank you eric. I attached my coding. Here I'm stuck with sorting. I'm using safari browser. Help me.

Thank you
How to sort the following xml string, based on num tag...?
Actually here i'm passing xml as string. If I pass as xml it works fine. It does not working if I pass xml as string i'm receiving error

Problem retrieving data

. What should I change to work fine. Here is my code.


Thanks
I want to change content type "text/html" to "text/xml". How to do this? XMLHttpRequest.setRequestHeader( "Content-Type", "text/xml;charset=UTF-8"); is not working...
Can you give example....?


Thanks
Hi all,

I need to get the data from the xml file and store it onto the database. Is there anyway of doing this?

thanks
This is my code... This is not inserting values into database... Whts wrong in my code... Pls help me..
<?xml version="1.0" encoding="ISO-8859-1"?>
<students>
<student id="1">
<name>
<first>Joe</first>
<last>Y</last>
<middle>T</middle>
</name>
<grade>
<points>99</points>
<letter>A</letter>
</grade>
</student>
<student id="2">
<name>
<first>James</first>
<last>Todd</last>
<middle>K</middle>
</name>
<grade>
<points>92</points>
<letter>B</letter>
</grade>
</student>
<student id="3">
<name>
<first>Kate</first>
<last>Wang</last>
<middle>A</middle>
</name>
<grade>
<points>72</points>
<letter>C</letter>
</grade>
</student>

</students>

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
<html>
<head>
<title>Set Examples</title>
<sql:setDataSource driver="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:db1" var="db1" />

</head>

<body>
<c:import var="students" url="students.xml" />

<x:parse var="doc" xml="${students}" />

<x:set var="a" select="$doc/students/student/name/first" />

<x:set var="b"
select="$doc/students/student/name/last" />

<x:set var="c"
select="$doc/students/student/name/middle" />

<table border="1">
<tr>
<td>$doc/students/student/name/first</td>

<td>
<x:out select="$a" />
</td>
</tr>

<tr>
<td>$doc/students/student/name/last</td>

<td>
<x:out select="$b" />
</td>
</tr>

<tr>
<td>$doc/students/student/name/middle</td>

<td>
<x:out select="$c" />
</td>
</tr>
</table>

<sql:update var="query1" dataSource="${db1}" sql="insert into studentDetails

values('${a}','${b}')">
</sql:update>
<c:out value="record added"/>
<c:forEach var="row" items="${query1.rowsByIndex}" >
<tr>
<td> <c:out value="${row.first}" /></td>
<td> <c:out value="${row.last}" /></td>
<td> <c:out value="${row.middle}" /></td>
</tr>
</c:forEach>

</table>
</body>
</html>
[ May 30, 2008: Message edited by: Palani Kumar ]
17 years ago
JSP
Here is my code i cant insert values into database... pls help me

<%@ page import="java.io.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
<html>
<head>
<title>Airport</title>
</head>
<body>
<c:import var="students" url="http://service.openkapow.com/palanikumar/airportbarbados.rest" />
<x:parse var="doc" xml="${students}" />
<table border="1">
<tr>
<th>AirportName</th>
<th>Location</th>
<th>Airport Overview</th>
<th>ByBus</th>
<th>ByTaxi</th>
<th>ByTrain</th>
<th>PhoneNum</th>
<th>Website</th>
</tr>
<x:forEach var="result" select="$doc/result">
<tr>
<td>
<x:out select="$result/AirportName" />
</td>
<td>
<x:out select="$result/Location" />
</td>
<td>
<x:out select="$result/ByBus" />
</td>
<td>
<x:out select="$result/ByTaxi" />
</td>
<td>
<x:out select="$result/ByTrain" />
</td>
<td>
<x:out select="$result/PhoneNum" />
</td>
<td>
<x:out select="$result/Website" />
</td>
</tr>
</x:forEach>
</table>
</body>
</html>
17 years ago
JSP
How can I store values in a database using JSTL...
17 years ago
JSP
Hi friends,
I created one program using JSTL which extract details from xml... Now i want to store that extracted values in a database.. How can i store that extracted values in a database..? Is there any option to store values in a variable...?Here is my code...

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
<html>
<head>
<title>Airport</title>
</head>
<body>
<c:import var="students" url="http://service.openkapow.com/palanikumar/airportbarbados.rest" />
<x:parse var="doc" xml="${students}" />
<table border="1">
<tr>
<th>AirportName</th>
<th>Location</th>
<th>Airport Overview</th>
<th>ByBus</th>
<th>ByTaxi</th>
<th>ByTrain</th>
<th>PhoneNum</th>
<th>Website</th>

<x:forEach var="result" select="$doc/result">
<x:out select="$result/AirportName" />
<x:out select="$result/Location" />
<x:out select="$result/ByBus" />
<x:out select="$result/ByTaxi" />
<x:out select="$result/ByTrain" />
<x:out select="$result/PhoneNum" />
<x:out select="$result/Website" />
</x:forEach>
</body>
</html>
17 years ago
JSP