SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 240 | Next

Scott Klein

"Professional LINQ"

In addition to uniquely qualifying names, namespaces also serve the purpose of prefixes
within an XML document. Prefixes let you use shortcuts for XML namespaces, making the XML document
more readable and concise. The downside to prefixes is that they depend on their context for their
meaning. A prefix can be associated with different namespaces in different parts of the XML tree, making
the meaning much harder to understand.
LINQ to XML greatly simplifies programming with namespaces by removing the prefixes from the LINQ
API. When an XML document is loaded by LINQ to XML, prefixes are treated as shortcuts and resolved
to their corresponding namespaces (just like when XML is loaded by a DOM or SAX parser). Once the
XML document is loaded, namespaces are accessed via the namespace URI, not the prefix. Developers
work with XML names that are fully qualified.
141
Part II: LINQ to XML
Fully qualified names are represented by the XName class, and you have seen them throughout this book.
Whenever an XML name is required, you are dealing with the XName class, such as an XName parameter.


Pages:
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6