By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

XML

P: n/a
I want to store some data in a field in a database as XML - is there any
classes in .NET that allow me to pass data and tags to build up a string of
XML?

Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Look at System.Xml namespace. you can use XmlDocument or
XmlTextWriter as per you need
Nov 16 '05 #2

P: n/a
Tony,

Check out the classes in the System.Xml namespace, specifically the
XmlWriter and the XmlTextWriter classes, as they will help you construct XML
output, which you can then store to a string, which can then be placed in a
database.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tony" <To**@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
I want to store some data in a field in a database as XML - is there any
classes in .NET that allow me to pass data and tags to build up a string
of
XML?

Nov 16 '05 #3

P: n/a
How do these classes cope with me creating tags that clash with the data -
for instance is there a problem if I create code

<abc>abc</abc>

Thanks

"Nicholas Paldino [.NET/C# MVP]" wrote:
Tony,

Check out the classes in the System.Xml namespace, specifically the
XmlWriter and the XmlTextWriter classes, as they will help you construct XML
output, which you can then store to a string, which can then be placed in a
database.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tony" <To**@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
I want to store some data in a field in a database as XML - is there any
classes in .NET that allow me to pass data and tags to build up a string
of
XML?


Nov 16 '05 #4

P: n/a
Tony,

I don't understand what you mean. The example that you gave:

<abc>abc</abc>

Doesn't conflict with the data at all. It's just that the text in the
tag happens to be the same as the name of the tag. Any XML parser/generator
worth it's salt isn't going to get hung up on that. The
XmlWriter/XmlTextWriter certainly doesn't.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tony" <To**@discussions.microsoft.com> wrote in message
news:E7**********************************@microsof t.com...
How do these classes cope with me creating tags that clash with the data -
for instance is there a problem if I create code

<abc>abc</abc>

Thanks

"Nicholas Paldino [.NET/C# MVP]" wrote:
Tony,

Check out the classes in the System.Xml namespace, specifically the
XmlWriter and the XmlTextWriter classes, as they will help you construct
XML
output, which you can then store to a string, which can then be placed in
a
database.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tony" <To**@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
>I want to store some data in a field in a database as XML - is there any
> classes in .NET that allow me to pass data and tags to build up a
> string
> of
> XML?
>


Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.