How to parse and validate a file through XSD
I have multiple type of file format and we have define all this rule in XSD and our oracle SOA suite is using this XSD in parsing any kind of files. i.e I have pipe, comma, fixed length and special character separated file data.
Now I don't want to write the big code again for the parasoft to parse and validate the file format. I am not getting any option where i can select my input file & XSD and apply to validate and parse my input file.
Please help me, how can i use the XSD for validating and parsing the input file and don't want to write the big code.
Best Answer
-
Unfortunately it sounds like you will need to write or import the code that knows how to process the flat file. SOAtest has an extensibility framework that makes it possible to create custom message formats where SOAtest can then work with messages in custom formats - but the work of creating that custom extension would be up to you.
It's not entirely clear to me what format your file is in - but you should check to see if it's in a format that SOAtest already supports out of the box (see the EDI Client). SOAtest does support fixed length, CSV with custom delimiters, and lots of other formats.
5
Answers
-
Does your XSD file follow the official schema definition, or is is a custom XSD file that is your own format? What would you like to accomplish in SOAtest using your XSD - would you like to use the XSD to define your messages (such as in a messaging client) or do you want to use it for something else?
0 -
I am not getting any option where i can select my input file & XSD and apply to validate and parse my input file.
In SOAtest, you use the XML Validator tool. You can specify your XML input document and add one or more XSDs to validate against.
I have pipe, comma, fixed length and special character separated file data.
Not sure what you mean. XSD means "XML Schema Definition" It is for validating XML files.
0 -
My input file is not a xml. It's a flat file. data is separated by comma, pipe. so not able to use xml validator. we define the rule in XSD but input file is not xml.
0