Read attributes of elements from xml schema.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • asjad

    Read attributes of elements from xml schema.

    Is there any way through which attributes of elements along with their
    default value and possible values can be retrieved from the schema
    using C#.
    Any help will really be appreciated.

  • asjad

    #2
    Re: Read attributes of elements from xml schema.

    I am able to get the attributes by first compiling the schema and then
    accessing elements.
    But there is another problem now. The schema file (File1) i am using
    includes another schema file(File2). The type of elements are defined
    in File2 and when i compile the schema of File1 it gives an error that
    the complex type used is not defined. So is there any thing that can be
    done to compile schema such that included schema is compiled itself.

    Comment

    • asjad

      #3
      Re: Read attributes of elements from xml schema.

      I am able to get the attributes by first compiling the schema and then
      accessing elements.
      But there is another problem now. The schema file (File1) i am using
      includes another schema file(File2). The type of elements are defined
      in File2 and when i compile the schema of File1 it gives an error that
      the complex type used is not defined. So is there any thing that can be
      done to compile schema such that included schema is compiled itself.

      Comment

      • Priya Lakshminarayanan

        #4
        Re: Read attributes of elements from xml schema.

        When you compile a schema using XmlSchemaSet in .NET 2.0 (or
        XmlSchemaCollec tion in .NET 1.1), the included schema will automatically be
        resolved and compiled.
        Can you post the code that you are using to compile schema1?

        Thanks,
        Priya

        "asjad" <ali.asjad@gmai l.com> wrote in message
        news:1142418659 .662581.244860@ u72g2000cwu.goo glegroups.com.. .[color=blue]
        >I am able to get the attributes by first compiling the schema and then
        > accessing elements.
        > But there is another problem now. The schema file (File1) i am using
        > includes another schema file(File2). The type of elements are defined
        > in File2 and when i compile the schema of File1 it gives an error that
        > the complex type used is not defined. So is there any thing that can be
        > done to compile schema such that included schema is compiled itself.
        >[/color]


        Comment

        Working...