Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

References

XML Validation using Visual Studio Code (for Windows, Mac, Linux)

Steps:

  1. Open the Visual Studio Code application

  2. Install the XML extension

    1. Navigate to the Extensions tab

    2. Enter “XML” in the search bar

    3. Click the XML Extension by Red Hat

    4. Click the [Install] button

  3. Open the LT i.SAF-T XML file

    1. Click “File” > click “Open File…”

    2. On the pop-up window, navigate to the directory where the XML file is located

    3. Select the XML file

    4. Click [Open]

  4. Bind XML to a Schema located in local directory

    1. Navigate to the <AuditFile> element of the XML

    2. Hover to the “…” icon

    3. Click “Quick Fix…”

    4. Click “Bind to existing grammar/schema”

    5. Select “local” binding type

    6. On the pop-up window, navigate to the directory where the XSD file is located

    7. Select the XML file

    8. Click [Select XSD file]

    9. Select “Standard (xsi, DOCTYPE) binding type)

  5. Remove previously bound Schema

    1. Navigate to the <AuditFile> element of the XML

    2. Remove the following attributes:

    3. Save the XML document

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns="https://www.vmi.lt/cms/saf-t"
  6. XML Validation against XSD is now working in real time. Errors, if there are any, will be underlined by the red crooked lines. Hover over the the lines to check the error details.

XML Validation using Notepad++ (for Windows)

  • No labels