views:

88

answers:

4

Hi

I’d like to start learning Linq to Xml, but before I do that, are there any technologies I should know prior to learning Linq to Xml?

Thus, besides the basics of XML and XML schema, which of the following technologies I must, which I would be advisable to and which I don’t need to learn before trying to learn Linq to XML:

• Net Schema Object Model

• XPath

• Working with XPath in .Net (System.Xml.XPath namespace)

• XSLT

• XML serialization

• XML Readers and Writers ( XmlTextReader,XmlTextWriter etc )

• Anything else?

thanx

+1  A: 

My suggestion:

  • XPath
  • XSLT
  • XML Schemas

in this order. These are not required to learn LINQ to XML, but can provide a good background on what to do with XML documents.

Rubens Farias
+1  A: 

It all depends on how much you want to learn and the reason you want to learn it.

For me, I've gotten pretty far just by knowing a few of the following with LINQ:

XDocument
XElement("ThisChildElement").Value
XElements()
XElements().InsertLinqCommandHere

When using XML as a way to store data, learning the basics of XML and LINQ to XML will take you a long way. I started by learning the very basics of how an XML document is structured and how to pull data out of an XML document using LINQ. Personally, I plan to add other concepts as necessary if I get into more advanced stuff.

Ben McCormack
A: 

Everything you wrote will help you, but you missed an important one, I guess it's not there cause it's not XML related, but it'll help you a lot to know SQL.

sebastian
+1  A: 

I agree with Ben's answer. None of those are prerequisites for learning LINQ to XML.

Jump in and start working with LINQ to XML and pick up those other things when you find a need for them.

With LINQ to XML you probably won't need XPath or XML readers or writers. I learned those before working with LINQ to XML because that's all that existed at the time. LINQ to XML is much simpler and should be easier to learn.

I'd like to know XSLT, but haven't had the time or real need to learn it.

You didn't mention which language you use. LINQ to XML is one area where VB.NET provides more richness than C# does. If you're curious what it looks like in VB.NET, there is a great set of "How Do I" videos by Beth Massi on LINQ in general with a few good ones covering LINQ to XML and XML Literals.

http://msdn.microsoft.com/en-us/vbasic/bb466226.aspx#linq

Dennis Palmer