Click here to Skip to main content
15,900,495 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: trying to write an XSL conditional statement Pin
Philip Fitzsimons14-Apr-04 4:56
Philip Fitzsimons14-Apr-04 4:56 
GeneralRe: trying to write an XSL conditional statement Pin
feline_dracoform14-Apr-04 6:00
feline_dracoform14-Apr-04 6:00 
GeneralRe: trying to write an XSL conditional statement Pin
Philip Fitzsimons14-Apr-04 6:03
Philip Fitzsimons14-Apr-04 6:03 
GeneralRe: trying to write an XSL conditional statement Pin
feline_dracoform14-Apr-04 6:38
feline_dracoform14-Apr-04 6:38 
GeneralRe: trying to write an XSL conditional statement Pin
Philip Fitzsimons14-Apr-04 22:45
Philip Fitzsimons14-Apr-04 22:45 
GeneralRe: trying to write an XSL conditional statement Pin
feline_dracoform15-Apr-04 0:19
feline_dracoform15-Apr-04 0:19 
QuestionXmlTextWriter / XmlDocument??? Pin
jmg57857-Apr-04 13:21
jmg57857-Apr-04 13:21 
GeneralCircular XSD and ADO DataSet Pin
Member 10037877-Apr-04 5:37
Member 10037877-Apr-04 5:37 
My goal is to take advantage of XML as a data store. The goal is functionality similar to the Windows registry - I want to have a folder tree with each folder being able to contain "items". The "items" will only be one type - strings.

I've created an XSD schema and an XML data file, both seem to validate fine. (They are included below...)

My problem seems to be that the ADO.NET DataSet object cannot handle the schema because it uses circular references. (The folder type contains folder types).

The reason I took this approach is so that I could add more levels of folders without needing to change the schema. The XSD seems like it is valid from everything I've read about XML, however, it seems like ADO.NET just can't handle it. Yes?

So, I'm looking for hints about what to do - drop the schema and have specific types with a predefined folder tree, or maybe there is another way to read in the XML document that I have not using ADO.NET. Help.


Schema:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="XMLSchema1" targetNamespace="http://tempuri.org/XMLSchema1.xsd" elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLSchema1.xsd" xmlns:mstns="http://tempuri.org/XMLSchema1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="FolderType">
<xs:sequence>
<xs:element name="Folder" type="FolderType" maxOccurs="unbounded" minOccurs="0" />
<xs:element name="Item" type="ItemType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="Name" type="xs:string" use="required" />
<xs:attribute name="Description" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="ItemType">
<xs:sequence>
<xs:element name="Value" type="xs:string" />
</xs:sequence>
<xs:attribute name="Encrypted" type="xs:boolean" use="required" />
<xs:attribute name="Description" type="xs:string" use="optional" />
<xs:attribute name="Name" type="xs:string" use="required" />
</xs:complexType>
<xs:element name="ASO">
<xs:complexType>
<xs:sequence>
<xs:element name="Common" type="FolderType" minOccurs="1" maxOccurs="1" />
<xs:element name="Application" type="FolderType" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="Name" type="xs:string" use="required" />
<xs:attribute name="Version" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
</code>

XML File:

<?xml version="1.0" encoding="utf-8" ?>
<ASO xmlns="http://tempuri.org/XMLSchema1.xsd" Name="Developer" Version="0.1">
<Common Name="Common" Description="Common Settings">
<Folder Name="Oracle">
<Folder Name="HRPRD">
<Item Name="UserID" Encrypted="false">
<Value>sysadm</Value>
</Item>
<Item Name="Password" Encrypted="true">
<Value>sysadm1</Value>
</Item>
</Folder>
</Folder>
</Common>
<Application Name="PSTNotify">
</Application>
<Application Name="PSTExport">
<Folder Name="Level1">
<Folder Name="Level2">
<Folder Name="Level3">
<Folder Name="Level4">
<Item Name="Test" Encrypted="false">
<Value>Test</Value>
</Item>
</Folder>
</Folder>
</Folder>
</Folder>
</Application>
</ASO>


Thanks,
Brian
GeneralRe: Circular XSD and ADO DataSet Pin
Member 10037877-Apr-04 12:33
Member 10037877-Apr-04 12:33 
GeneralStructure not displayed by Data View Pin
Anonymous5-Apr-04 12:22
Anonymous5-Apr-04 12:22 
GeneralXSL Sorting Pin
afronaut1-Apr-04 4:40
afronaut1-Apr-04 4:40 
Generalget_Length Pin
rajprabha29-Mar-04 23:38
rajprabha29-Mar-04 23:38 
GeneralProblem Using Dll File in .Net Pin
naresh_pandey1326-Mar-04 21:20
naresh_pandey1326-Mar-04 21:20 
GeneralRe: Problem Using Dll File in .Net Pin
Heath Stewart26-Mar-04 21:45
protectorHeath Stewart26-Mar-04 21:45 
GeneralXml/A and Olap Pin
naresh_pandey1326-Mar-04 19:32
naresh_pandey1326-Mar-04 19:32 
Generalmsxml get element line / position Pin
Brian van der Beek25-Mar-04 3:06
Brian van der Beek25-Mar-04 3:06 
GeneralRe: msxml get element line / position Pin
Michael Flanakin25-Mar-04 18:21
Michael Flanakin25-Mar-04 18:21 
GeneralRe: msxml get element line / position Pin
Brian van der Beek25-Mar-04 20:41
Brian van der Beek25-Mar-04 20:41 
GeneralRe: msxml get element line / position Pin
Michael Flanakin26-Mar-04 1:54
Michael Flanakin26-Mar-04 1:54 
GeneralRe: msxml get element line / position Pin
Philip Fitzsimons26-Mar-04 4:09
Philip Fitzsimons26-Mar-04 4:09 
GeneralRe: msxml get element line / position Pin
Brian van der Beek26-Mar-04 4:27
Brian van der Beek26-Mar-04 4:27 
GeneralConsuming SOAP Web Service (.cgi) Using .NET Client Pin
perlmunger23-Mar-04 8:12
perlmunger23-Mar-04 8:12 
GeneralRe: Consuming SOAP Web Service (.cgi) Using .NET Client Pin
Michael A. Barnhart25-Mar-04 15:25
Michael A. Barnhart25-Mar-04 15:25 
GeneralRSS unread Item Pin
Davide Icardi23-Mar-04 8:05
Davide Icardi23-Mar-04 8:05 
Generalstartin xml \ xsl Pin
Mr. Cully21-Mar-04 4:47
Mr. Cully21-Mar-04 4:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.