views:

123

answers:

1

Hi

I’d like to learn how to create custom providers ( say custom membership provider or custom profiles ) that use XML as their data store. Is ( using C# ) best way to accomplish this using XPath/XSLT or DOM?

thanx

+1  A: 

If you start at the documentation for MembershipProvider, you will find plenty of links that walk you through how to implement custom providers.

These days, to deal with XML, my default approach would be to use the LINQ to XML classes (XDocument and friends).

Mark Seemann
Does learning LINQ to XML mean one doesn't need to know/learn XPath/XSLT and DOM?
SourceC
You should be able to go a long way without knowing too much about XPath, although that will never hurt. The XML DOM is more or less obsolete, so yes: you should be able to get by without it at all.
Mark Seemann
Are XML DOM and XPath alternative technologies used to do the same job? If so, are you then implying if I ever decide to learn one of the two, I should choose XPath since XML DOM is on its way out?
SourceC
XPath is a cross-platform DSL for specifying nodes in an XML infoset. It serves a different purpose than the DOM because you can't really *build* XML with XPath. LINQ to XML is what is supplanting the XML DOM on the .NET platform.
Mark Seemann
Uhm,t his is confusing.I did a bit of googling and it seems Linq to Xml can also(at least in some cases) suplement XPath and Xslt.Anyways,t hank you for your time and help
SourceC