SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Custom tool error: Unable to convert input xml file content to a DataSet. The same table (table_name) cannot be the child table in two nested relations.

rated by 0 users
This post has 1 Reply | 1 Follower

Top 500 Contributor
Posts 3
kenny54 Posted: 01-13-2006 5:17 PM
Hi Everyone,

I am trying to convert a XML file into XSD, but i couldn't because one of the child has the same name as the parent.
I had changed one of the "website" to "websites" instead to do the conversion and changed back the value.
The XSD is created but the Dataset cannot be generated using the original value "website".  I need the original value to do validation of incoming XML file which is a standard i need to follow.

Anyone can offer some help how to generate the Dataset for this example???

Thanks in advance :)

Cheers,
Kenny
....
      <Website>
         <WebsiteDescription>WebsiteDescription</WebsiteDescription>
         <WebsiteLink>http://community.sgdotnet.org/forums/AddPost.aspx?ForumID=21</WebsiteLink>
      </Website>
 ....
      <company>
         <companyName>Singapore</PublisherName>
         <Website>
            <WebsiteDescription>>WebsiteDescription</WebsiteDescription>
            <WebsiteLink>http://community.sgdotnet.org</WebsiteLink>
         </Website>
      </company>
....
Top 10 Contributor
Posts 865

 kenny54 wrote:

...
I had changed one of the "website" to "websites" instead to do the conversion and changed back the value.
The XSD is created but the Dataset cannot be generated using the original value "website"...

...I need the original value to do validation of incoming XML file which is a standard i need to follow....

You changed the "website" to "websites" to generate a schema and then changed it back to "website" again after that ? If the answer is yes - then of course the dataset cannot be generated. In other words, the structure of your document has changed but not your schema.

This happened to be one of the design behavior of VS.NET 2003. Read here. It relates to how VS.NET 2003 IDE opens up and process these documents

There are 2 ways of hacking this sans modifying your table structure.

  1. Do a XSL Transform. Cheaper, alternative ...and... you actually work at it and learn something new Wink [;)]
  2. VS.NET 2005 fixes this "design-by-behaviour" flaw

~Softwaremaker (BLOG) M. Twain: "I didn't have time to write a short letter, so I wrote a long one instead"

Page 1 of 1 (2 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems