This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!

James Sivakumar

Greenhorn
+ Follow
since Nov 16, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by James Sivakumar

My page has two listbox say Left Listbox and right Listbox,How to do the following task.

�>� � Move the selected option from the left listbox to the right listbox.
�>>� � Move all options from the left listbox to the right listbox.
�<<� � Move all options from the right listbox to the left listbox.
�<� � Move the selected options from right listbox to the left listbox.

Thanks,
Shiva
Is it possible to know whether an element exist in the document while it is loaded.
Here for instance the radio button with a name=�pid�.What I want is when the document is loaded , if that element exist (name=�pid�) then it should be selected.
Else don�t do anything.Can anybody say how to do this , jus send me a sample code. Or is there a better way to do the above mentioned task ?

CODE :
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<script language="javascript">
function getRadioSelected()
{
// Code to be filled here
//if pid element exist do the following stuffs
//else dont do
var radioLength = document.list.pid.length;
if(radioLength > 0)
{
document.list.pid[0].checked=true;
}
else
{
document.list.pid.checked=true;
}
}
</script>
</HEAD>
<BODY onLoad="getRadioSelected()">
<form name="list" method="post">
<P> </P>
<br><br>
<input type="radio" name="pid" value=1>
<input type="radio" name="pid" value=2>
<input type="submit" Value="Edit" name="edit">  
<input type="submit" Value="Delete" name="delete">  
</form>
</BODY>
</HTML>
Is it possible to know whether an element exist in the document while it is loaded.
Here for instance the radio button with a name=�pid�.What I want is when the document is loaded , if that element exist (name=�pid�) then it should be selected.
Else don�t do anything.Can anybody say how to do this , jus send me a sample code. Or is there a better way to do the above mentioned task ?
Hi Ajit & Bill,
Thanks for the solution , can you people please send me the sample code for this , I'm using xalan parser so that I can try out that here.
Awaiting for your reply !
Shiva.
Hi Ajit & Bill,
Thanks for the solution , can you people please send me the sample code for this , I'm using xalan parser so that I can try out that here.
Awaiting for your reply !
Shiva.
Hi All,
Generally we use to have the dtd as extenal or internal,But
Is there a way that we can load the DTD into memory (i.e the dtd will not reside in the hard disk as 1.dtd etc.. instead we create it in the memory/dynamically and make use of it) and use some code to validate whether the XML document created follows the DTD structure?
Shiva.

Hi David,
Thanks for ur code man , its working here.
One more question would like to know ...
Is there a way that you can load the DTD into memory and use some code to validate whether the XML document created follows the DTD structure?
Can you give me your email address, will keep in touch with you.
You can reach me at shivgs@rediffmail.com
Bye,
Shiva.
Hi David,
Thankz for sending that sample code , Lemme try this here and will get back to you.
Bye,
Shiva.
Thanks David ,
But Can u say how to create or can u post any sample code.
I'm using xalan parser
Shiva.
Hi All,
Is there any way to create a XSL file in memory ,
like similar to , what we do in creation of xml file in memory using DOM.
Example :
Document doc = new DocumentImpl();
Element cd = doc.createElement("CD");
doc.appendChild(table);
Element author = doc.createElement("author");
author.appendChild(doc.createTextNode("Charles"));
author.appendChild(author);
...
Is it possible to create a XSL file in memory(It should not in Hard Disk)
Bye,
Shiva.
I have a static xml and an xsl file and a jsp file , my task is
JSP file takes the XML file and the XSL file and outputs plain HTML to the browser.I'm using xerces parser.Can any body helpme out to solve this problem.
Moreover I tried a the following sample program....
When I run this it says NoClassDefFoundError , I hope the classpath are set right.
----------------------------------------------------------------
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import java.io.IOException;
// A Simple DOM Application
public class BasicDOM {

// Constructor
public BasicDOM (String xmlFile) {

// Create a Xerces DOM Parser
DOMParser parser = new DOMParser();
// Parse the Document
// and traverse the DOM
try {
parser.parse(xmlFile);
Document document = parser.getDocument();
traverse (document);
} catch (SAXException e) {
System.err.println (e);
} catch (IOException e) {
System.err.println (e);
}
}

// Traverse DOM Tree. Print out Element Names
private void traverse (Node node) {
int type = node.getNodeType();
if (type == Node.ELEMENT_NODE)
System.out.println (node.getNodeName());
NodeList children = node.getChildNodes();
if (children != null) {
for (int i=0; i< children.getLength(); i++)
traverse (children.item(i));
}
}

// Main Method
public static void main (String[] args) {
BasicDOM basicDOM = new BasicDOM (args[0]);
}
}
Hi All,
I'm quite new to JSP with XMl tech..
Can anybody help me out in solving this problem.

1a)How to create a JSP file which will generate an XML file containing all the records from the table(Use JDBC code within the JSP page instead of JavaBeans).
And also ....
b)Then the JSP file will use an XSL file that you have created to format the XML data into HTML code and send it back to the browser.

Shiva.
16 years ago
JSP
Can anyone say ..
1)what is servlet-centric and page-centric
2)Advantages of the servlet-centric model over the page-centric model in JSP
3)What is the difference between the include directive and the include action tag in JSP? When would you prefer one over the other?
4)Difference between javabeans and custom tags
5)What is the SingleThread model in servlets?
Need the answers urgently
17 years ago
Hi all,
I'm preparing for XML Certification. Can anybody suggest a good book for this or any online resources?
Regards,
Shiva.
Hi all,
I'm preparing for XML Certification. Can anybody suggest a good book for this or any online resources?
Regards,
Shiva.