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 XML - XSD - Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML - XSD - Java" Watch "XML - XSD - Java" New topic
Author

XML - XSD - Java

prasanna kanth
Greenhorn

Joined: May 14, 2006
Posts: 28
Hi pals, I am in urget neeed.

Acctuly, I am validating the XML with XSD, my problem is When we validate It required a Name of the XML(file path), but I am generating the XML by code, so its in a string,It will show the error at runtime.

What I need is - Is there is any method which will takes the String contents as parameter...
(or)
any converter this available...



Any point would be highly appricated...

Prasanna
[ August 04, 2006: Message edited by: prasanna kanth ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
If you just look a little more deeply into the StreamSource javadocs you will see that any InputStream or Reader can be used. See java.io.StringReader for the missing part.
Bill
prasanna kanth
Greenhorn

Joined: May 14, 2006
Posts: 28
Hi,

Thanks for your valuable time & your point.
I just converted a String into a reader, now this working fine...




With Cheers,
Prasanna T
[ August 16, 2006: Message edited by: prasanna kanth ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML - XSD - Java
 
Similar Threads
Validate XML against XSD
Unable to validate XML against the schema
XSD validation in XML
Error Validating huge XSD with XML in a Servlet
Problem validating XML against XSD using JDK1.4