Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pass XML datatype instead of Java data type

 
Dattatray Sutar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers!
I am trying to call a Class mothod from a JSP page.The method takes some parameters.I dont want to use Java data type parameter e.g. addfunction(int a,int b) where a and b are Java specific data type.Instead of this i want to pass XML data type and that class mothod will also accept the XML data type so that this will not remain Java specific mothod call.
So ini summary i want to know how to pass XML data type to a Java Mothod?
Thanks for your time.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to pass XML data type to a Java Mothod?


If you have an XML document parsed into a JAVA program you have a collection of Java objects which can be manipulated by standard Java techniques. For example, calling a method with a reference to a Node object - all perfectly normal Java.

See the JavaDocs for org.w3c.dom package for examples of the interfaces implemented by the Java objects making up a DOM (Document Object Model).

If you have further questions, try the XML forum.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic