This example shows how to validate XML data with XML schema and send the data to MySQL.
1. Create XML Schema (document) by using client provided Schema, which will be used for validation later.
2. Get the file from File System by using getFile (wMPublic) service
3. Validate the XML by using validate service. Where isValid is very important..if it's true means XML data has been validated successfully means positive path. Else, XML is wrong...which goes to negative path
4. For processing Converted data to DB, call subservice. Which makes our life easy.
5. Use Try/Catch strategy everywhere.
Finally, data has been inserted successfully..
GitHub: Source Code
XML File
XSD
Thanks for reading..
No comments:
Post a Comment