Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does anyone have an idea about how keep track of a paths in xsd
For example: if I have this schema,
<<pre lang="xml">xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"          targetNamespace="urn:books"            xmlns:bks="urn:books">
  <xsd:element name="books" type="bks:BooksForm"/>
  <xsd:complexType name="BooksForm">
    <xsd:sequence>
      <xsd:element name="book"                   type="bks:BookForm"                   minOccurs="0"                   maxOccurs="unbounded"/>
     </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="BookForm">
    <xsd:sequence>
      <xsd:element name="author"   type="xsd:string"/>
      <xsd:element name="title"    type="xsd:string"/>
      <xsd:element name="genre"    type="xsd:string"/>
      <xsd:element name="price"    type="xsd:float" />
      <xsd:element name="pub_date" type="xsd:date" />
      <xsd:element name="review"   type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id"   type="xsd:string"/>
  </xsd:complexType>
</xsd:schema

>

how can I get like this output in c#
path1 : books.booksForm.book.bookForm.author
path2 : books.booksForm.book.bookForm.title
... so on
for any schema structure

does anyone have an idea about this or any good starting points
thanks in advance
Posted

1 solution

Have you tried LINQ to XSD?If not,check this

LINQ to XSD[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900