Issue
I have an XML file in the res/xml folder which I want to parse using getXML()
.
But I also want to validate it first against an XSD schema.
How can I create a InputStreamReader for the XML file for validation?
It turns out that to use openRawResource()
the file should be under res/raw or in assets
Solution
read it from the classpath, getclass -> getresourceasstream. For validation consider using the xerces lib.
Answered By - robermann
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.