Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with xml structure

Status
Not open for further replies.

NeoSthlm

Programmer
Jun 22, 2004
5
SE
I am developing a faq stored in a xmlfile. The faq has several main categories, in every main categories there might be none or several subcategories. I am trying this...

<?xml version="1.0"?>
<faq>
<language>
<languageId>EN</languageId>
<category>
<categoryId>1</categoryId>
<categoryName>Search</categoryName>
<subCategory>
<subCategoryId>1</subCategoryId>
<subCategoryName>Search subcategory1</subCategoryName>
<faqQuestion>
<question>What happens if..?</question>
<answer>Nothing..</answer>
<visible>true</visible>
<dateCreated>2005-09-15</dateCreated>
</faqQuestion>
</subCategory>
<subCategory>
<subCategoryId>2</subCategoryId>
<subCategoryName>Search subcategory2</subCategoryName>
<faqQuestion>
<question>How can I..?</question>
<answer>Do like this..</answer>
<visible>true</visible>
<dateCreated>2005-09-15</dateCreated>
</faqQuestion>
</subCategory>
<faqQuestion>
<question>If I want...</question>
<answer>Click on..</answer>
<visible>true</visible>
<dateCreated>2005-09-15</dateCreated>
</faqQuestion>
</category>
</language>
</faq>

I get the answer (.net) "The same table (faqQuestion) cannot be the child table in two nested relations."

Can anyone help me how to get a working structure on this xmlfile?

 
I changed the last faqQuestion to be in noSubCategory
then changed name on the tags.. <noSubCatQuestion> etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top