Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

XML Valitadator

Pattu
Pattu Posts: 44

I have XSD schema , I am trying to figure out how to validate the schema Vs XML . Can you help how to use the tool?

Answers

  • Pattu
    Pattu Posts: 44

  • benken_parasoft
    benken_parasoft Posts: 1,291 ✭✭✭

    To check an XSD file for validity, make sure "Validate against schema" is enabled then configure the Input tab with the location of your XSD file. SOAtest has a collection of built-in XSDs including the ones for validating XSD documents. For reference, the list of built-in XSDs can be found under "Parasoft > Preferences > XML Schema Locations".

    To check an XML document for validity, make sure "Validate against schema" is enabled then configure the Input tab with the location of your XML file. Also, select the box to "Validate against schemas referenced in the following WSDL or Schema" then provide the path to the XSD document. This assumes that the "targetNamespace" of your XSD matches the "namespace" of the XML document you are attempting to validate.

    In either case, the XML Validator will report violations for any nodes in the input document that violate the schema, any of the built-in schemas or the one you can specify directly in the tool.

  • Pattu
    Pattu Posts: 44

  • Pattu
    Pattu Posts: 44

  • Pattu
    Pattu Posts: 44

  • Pattu
    Pattu Posts: 44

    It doesnt work , pls help

  • benken_parasoft
    benken_parasoft Posts: 1,291 ✭✭✭
    edited October 4

    Any other errors reported? Perhaps your XSD is bad.

  • Pattu
    Pattu Posts: 44

    No thats the same error i am getting

  • benken_parasoft
    benken_parasoft Posts: 1,291 ✭✭✭

    Your XML document has an "xsi:schemaLocation" attribute which is a URI or relative URI in this case. This means the schema document must be located at that exact location next to the XML file being checked. So, the Input tab may need to reference that XML document as a file on disk right next to the XSD for that particular namespace.