Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. xml validation in C# giving errors during the process?

xml validation in C# giving errors during the process?

Scheduled Pinned Locked Moved C#
xmlcsharpdatabasehelpquestion
6 Posts 2 Posters 0 Views 1 Watching
  • 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.
  • N Offline
    N Offline
    nicolus
    wrote on last edited by
    #1

    My XML schema passes the validation of XMLSpy without any problem, however, when I loaded it to validate an instance XML document in my C# program, I got many errors and warnings. Do i need to set any properties for the same behaviour as of XMLspy? if so what are those? Can any body pls tell me some thing in this regard. Thanks.

    L 1 Reply Last reply
    0
    • N nicolus

      My XML schema passes the validation of XMLSpy without any problem, however, when I loaded it to validate an instance XML document in my C# program, I got many errors and warnings. Do i need to set any properties for the same behaviour as of XMLspy? if so what are those? Can any body pls tell me some thing in this regard. Thanks.

      L Offline
      L Offline
      Larantz
      wrote on last edited by
      #2

      Could you please provide us with the error message you're getting? -Larantz-

      for those about to code, we salute you
      http://www.itverket.no

      Please refer to the Forum Guidelines for appropriate posting.

      N 1 Reply Last reply
      0
      • L Larantz

        Could you please provide us with the error message you're getting? -Larantz-

        for those about to code, we salute you
        http://www.itverket.no

        Please refer to the Forum Guidelines for appropriate posting.

        N Offline
        N Offline
        nicolus
        wrote on last edited by
        #3

        "Empty choice cannot be satisfied if 'minOccurs' is not equal to 0." and "Some elements have invalid values according to their datatype" Can you pls tell me to validate ( as it was done in XML ) with out modifying the input xml file. Thanks.

        L 1 Reply Last reply
        0
        • N nicolus

          "Empty choice cannot be satisfied if 'minOccurs' is not equal to 0." and "Some elements have invalid values according to their datatype" Can you pls tell me to validate ( as it was done in XML ) with out modifying the input xml file. Thanks.

          L Offline
          L Offline
          Larantz
          wrote on last edited by
          #4

          According to the errormessages, I'd say that your xml file violates the rules dictated by your xls schema. If you don't want to edit the xml file, you'll most likely have to take a look at the xls schema. -Larantz-

          for those about to code, we salute you
          http://www.itverket.no

          Please refer to the Forum Guidelines for appropriate posting.

          N 1 Reply Last reply
          0
          • L Larantz

            According to the errormessages, I'd say that your xml file violates the rules dictated by your xls schema. If you don't want to edit the xml file, you'll most likely have to take a look at the xls schema. -Larantz-

            for those about to code, we salute you
            http://www.itverket.no

            Please refer to the Forum Guidelines for appropriate posting.

            N Offline
            N Offline
            nicolus
            wrote on last edited by
            #5

            Is n't there any other choice, like setting some options to make it Valid? :confused:

            L 1 Reply Last reply
            0
            • N nicolus

              Is n't there any other choice, like setting some options to make it Valid? :confused:

              L Offline
              L Offline
              Larantz
              wrote on last edited by
              #6

              I'm not sure. But I don't see the point of having a xls schema to help you form your xml correctly, if you don't follow the schema. :) Then you might aswell remove it. -Larantz-

              for those about to code, we salute you
              http://www.itverket.no

              Please refer to the Forum Guidelines for appropriate posting.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups