Hi folks. I'm trying to structure an XML document in the most efficient way possible and I have come accross a question I think I need answering. Here is my document structure - sorry no schema yet, this is an XLM doodle if you will.
The problem is I could have five roles and thirty users all using the Demo Tool with the same data and the same title and link. I don't want to have to replicate this data over and over again and I DO want to cascade updates to the data.
Is this where something like XPath would come in? I'm reading and writing this document with C# and the .NET 2.0 framework so solutions need to be implementable in said enviroment (prefereably without having to chase down custom libraries.
The easyest solution is to use a primary/foreign key system and two documents (tools.xml and access.xml, say). I just seem to feel that there should be a more graceful way of pulling that off in XML
Thanks for any time you give me
Yet another unchecked rambling brought to you by:
Oddball
Code:
<toolAdmin>
<users>
<user name="oddball">
<tool name="demoTool">
<linkTitle>TekTips Demo Data</linkTitle>
<linkTarget>~/TekTips/demo.aspx</linkTarget>
<data id="var1">lemon</data>
<data id="var2">lime</data>
<data ... /data>
</tool>
<tool ... /tool>
</user>
<user name="foobar">
<tool name="demoTool">
<linkTitle>TekTips Demo Data</linkTitle>
<linkTarget>~/TekTips/demo.aspx</linkTarget>
<data id="var1">lemon</data>
<data id="var2">lime</data>
</tool>
<tool ... /tool>
</user>
</users>
<roles .../*Same as users*/... /roles>
</toolAdmin>
The problem is I could have five roles and thirty users all using the Demo Tool with the same data and the same title and link. I don't want to have to replicate this data over and over again and I DO want to cascade updates to the data.
Is this where something like XPath would come in? I'm reading and writing this document with C# and the .NET 2.0 framework so solutions need to be implementable in said enviroment (prefereably without having to chase down custom libraries.
The easyest solution is to use a primary/foreign key system and two documents (tools.xml and access.xml, say). I just seem to feel that there should be a more graceful way of pulling that off in XML
Thanks for any time you give me
Yet another unchecked rambling brought to you by:
Oddball