chima
asked on
Xml Schema parser
Hello,
Given the following line of code;
SchemaParser sparser = new SchemaParser(schemaParserF ile.toURI( ).toURL()) ;
The URL points to an xml file.
How could one print/show the content of sparser?
I have tried; System.out.print(sparser.g etConstrai nts()); but nothing get printed. it could be that it is empty.
Also, if the xml file does not have "constraints" then the method getContraints might have nothing to get.
I was hoping it would read/get the tags, but it does not seem like it does.
Any suggestions?
Given the following line of code;
SchemaParser sparser = new SchemaParser(schemaParserF
The URL points to an xml file.
How could one print/show the content of sparser?
I have tried; System.out.print(sparser.g
Also, if the xml file does not have "constraints" then the method getContraints might have nothing to get.
I was hoping it would read/get the tags, but it does not seem like it does.
Any suggestions?
ASKER
mwvisa1, while I got the code from here; http://www.javaworld.com/jw-11-2000/Validation/src.zip
I have debugged it some. If you need to see the debugged version, please let me know.
I have debugged it some. If you need to see the debugged version, please let me know.
ASKER
mwvisa1, I looked at the link that you provided and it is the package I am using. How then could I look at the Map? The xml file I am working with does not provide constraints. It provides tags and it is these tags information that I am hoping to parse.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, more to come.
http://oodt.jpl.nasa.gov/metadata-service/apidocs/jpl/eda/metadata/validation/package-summary.html
Then it appears you get the constraints that the Schema defines as a Map. The API for the Constraint object itself can be found on same link above.
Otherwise, please provide the package you are using SchemaParser from.