File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes validating data in varibale possible???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "validating data in varibale possible????" Watch "validating data in varibale possible????" New topic
Author

validating data in varibale possible????

Sandeep Jain
Ranch Hand

Joined: Oct 25, 2000
Posts: 124
Hello All,
I am collecting the data in a servlet from the front end ie: the form in html. Now I have to generate the xml part .So what I have done is generated the entire XML in a string variable. Kindly note data is stored in a variable and not in a file. Now I have to validate this data How do I do it.
Correct me if my approach is wrong.

------------------
Sandeep Jain


Try and Try Till u succeed<br /> <br />Sandeep Jain
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
You are building the XML as a String and you need to validate the XML right?
Many parsers accept either a File or an InputStream as input. So you could build an instance of java.io.StringBufferInputStream with your string and pass it on to the parser.
Good luck,

------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validating data in varibale possible????