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. XML / XSL
  4. Allowing any element in a complex element

Allowing any element in a complex element

Scheduled Pinned Locked Moved XML / XSL
xmldatabasehelpquestion
3 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.
  • I Offline
    I Offline
    impeham
    wrote on last edited by
    #1

    Hi. I have the following element definition in my schema: when i use an XML that validates with it and tries to define element under it, i get an error on validation: " is not allowed under element " i want to be able to add ANY element under this one. how can it do that in the schema? Thanks.

    L 1 Reply Last reply
    0
    • I impeham

      Hi. I have the following element definition in my schema: when i use an XML that validates with it and tries to define element under it, i get an error on validation: " is not allowed under element " i want to be able to add ANY element under this one. how can it do that in the schema? Thanks.

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      <xs:any minoccurs="0"/> http://www.w3schools.com/schema/schema_complex_any.asp[^]

      led mike

      I 1 Reply Last reply
      0
      • L led mike

        <xs:any minoccurs="0"/> http://www.w3schools.com/schema/schema_complex_any.asp[^]

        led mike

        I Offline
        I Offline
        impeham
        wrote on last edited by
        #3

        This requires declaring this element in another schema... but what i need is not declare it at all - just allow any element in the XML to be under the parent element.

        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