I'm new to XML and .NET in general and I'm lost in the maze of all the
various Xml classes. What I want to do is programatically create an xml
structure and store it in a database column, for example :-
<FlavourID>0</FlavourID>
<FormID>Form1</FormID>
<ItemKey>EmployeeName</ItemKey>
<PropertyKey>PropertyDataHere</PropertyKey>
<Value>ValueHere</Value>
is one such structure I might want to store in a database column. The reason
I dont store this in 5 columns is that the structure itself is variable. My
problems are :-
1) I dont know how to programatically create a structure - I'm confused with
XmlDocument, XmlDataDocument, XmlNode, XmlTextWriter etc. I basically want
to end up with one single datatype that can be stored in a single column in
a database, which brings me to the second problem:
2) I dont know the best way to store this in a database column. I know there
is some Xml support in SqlServer 2000 and more in 2005, but with something
as simple and small as this maybe converting and storing as Text or Varchar
would be sufficient.
Any help very gratefully appreciated !
"JezB" <jezbroadsword@.blueyonder.co.uk> wrote in message
news:Oxp2glBaEHA.524@.TK2MSFTNGP09.phx.gbl...
[snip]
> 1) I dont know how to programatically create a structure - I'm confused
> with
> XmlDocument, XmlDataDocument, XmlNode, XmlTextWriter etc. I basically want
> to end up with one single datatype that can be stored in a single column
> in
> a database, which brings me to the second problem:
Here are two good articles on Xml in .Net:
http://msdn.microsoft.com/library/de...ml03172004.asp
http://support.softartisans.com/kbview.aspx?ID=673
> 2) I dont know the best way to store this in a database column. I know
> there
> is some Xml support in SqlServer 2000 and more in 2005, but with something
> as simple and small as this maybe converting and storing as Text or
> Varchar
> would be sufficient.
In SQL Server 2000 you would store it as a text column.
Bryant
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment