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!

xsl and xml?

Status
Not open for further replies.

attakrishna

Programmer
Jul 1, 2003
1
SE
In c# is there any defined datatyps one can use in xsl and xml?
 
I'm sorry, I don't understand the question.

XML has it's own set of datatypes, defined via an XSD file (usual set of numeric, string, datetime types). The only tricky one is the datetime, where you have to use the XmlConvert class to convert from the .NET DateTime to the ISO-8601 format that XML requires (and back again).

All the other standard datatypes (string, int, etc) convert transparently, although to be 100% correct, you should pass them through the XmlConvert class.

If you want to store a class that you've written as XML, you can go through the usual XmlSerializer class (.NET usually takes care of this for you), or you can write your own ToXml property to do it (so you'll have more control over the format of the XML that gets produced).

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top