Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Need to load XSD

    General Discussion
    4
    6
    8258
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ganesan govindarajan
      ganesan govindarajan last edited by

      Hi All

      I wanted to load new XSD in to the xml file.

      I am just open the xml and validate, but there is no pop up showing to load new XSD.

      Can anyone advise on this?

      ganesang

      Scott Sumner 1 Reply Last reply Reply Quote 0
      • Scott Sumner
        Scott Sumner @ganesan govindarajan last edited by

        @ganesan-govindarajan

        This is not really a Notepad++ related question…

        1 Reply Last reply Reply Quote 0
        • chcg
          chcg last edited by

          @ganesan-govindarajan Maybe you want to check N++ plugin XML Tools, see https://github.com/morbac/xmltools

          1 Reply Last reply Reply Quote 1
          • ganesan govindarajan
            ganesan govindarajan last edited by

            @chcg

            Thanks for the reply.

            I have already installed the XML tool plugin but my concern is when i open the new XML file which is different schema (XSD) than previous file and there is no pop-up show to load new schema file in Notepad++.

            1 Reply Last reply Reply Quote 0
            • PeterJones
              PeterJones last edited by PeterJones

              I don’t use XML (and thus XML Tools), so I’m not an expert on such things… But a quick google found https://stackoverflow.com/a/30167471/5508606, which claims that Plugins > XML Tools > Validate Now should pop up a window asking for where the XSD is. Does the procedure shown on Stack Overflow not work for you? If not, what does happen?

              As a test, I just grabbed the XML example from https://www.w3schools.com/xml/schema_example.asp, and when I tried to validate it, it said “Failed to locate the main schema resource at ‘shiporder.xsd’” – which was defined with the xsi:noNamespaceSchemaLocation. If I remove that from the <shiporder ...> tag, then when I try to validate, it asks me for the location. So my conclusion is that XML Tools will only ask you for the schema location if it’s not embedded in the XML itself; if it is embedded, it will automatically use the one it finds. (It even says that in the dialog: “This dialog box is displayed because the default validation schema cannot be found in XML root element. To avoid having to specify the XSD for every validation, please define the default XML schema in your root element using the following syntax: …, where XSD_FILE_PATH is the relative or absolute path of the XML schema file.”)

              If this doesn’t happen for you, give us a brief example XML and XSL that shows the problem. To embed the files in your reply, put 4 spaces before each row, and a blank line before and after, shown below.

              ----------

              Formatting / Rendering Example

              
              **XML**
              
                  <?xml version="1.0" encoding="UTF-8" ?>
                  <shiporder ...
                  ...
                  </shiporder>
              
              **XSD**
              
                  <?xml version="1.0" encoding="UTF-8" ?>
                  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
                  ...
                  </xs:schema> 
              
              

              which will render like

              XML

              <?xml version ...
              <shiporder ...
              

              XSD

              <?xml version="1.0" encoding="UTF-8" ?>
              <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
              ...
              </xs:schema>
              
              1 Reply Last reply Reply Quote 3
              • PeterJones
                PeterJones last edited by guy038

                PS: also look at Plugins > XML Tool > About XML Tools, and include your version of XML Tools. Also go to ? > Debug Info > Copy debug information to clipboard and paste in your reply. These will let us know the particulars of which Notepad++ and XML Tools, so we can try to better replicate your circumstances.

                Update Feb 25, 2020: issue #11 has been closed; the problem is fixed as of XML Tools v3.0.3.2

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Copyright © 2014 NodeBB Forums | Contributors