Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LINQ to XML ѧϰ±Ê¼Ç

LINQ to XML ¿ÉÒÔ¿´×÷ÊÇÒ»¸ö “better DOM” ±à³ÌÄ£ÐÍ£¬¿ÉÒÔºÍ System.Xml.dll ³ÌÐò¼¯Öеĺܶà³ÉÔ±½»»¥¡£
Ò»¡¢ÃüÃû¿Õ¼ä
System.Xml.Linq.dll ³ÌÐò¼¯¶¨ÒåÁËÈý¸öÃüÃû¿Õ¼ä£ºSystem.Xml.Linq, System.Xml.Schema  ºÍ System.Xml.XPath
×îºËÐĵÄÊÇ System.Xml.Linq£¬ ¶¨ÒåÁ˶ÔÓ¦ XML Îĵµ¸ö·½ÃæµÄºÜ¶àÀàÐÍ
Member of System.Xml.Linq
Meaning in Life
XAttribute
Represents an XML attribute on a given XML element
XComment
Represents an XML comment
XDeclaration
Represents the opening declaration of an XML document
XDocument
Represents the entirety of an XML document
XElement
Represents a given element within an XML document
XName/XNamespace
Provide a very simple manner to define and reference XML namespaces
¶þ¡¢±à³Ì·½Ê½´´½¨XMLÎĵµ
ÒÔÇ°µÄ .NET XML±à³ÌÄ£ÐÍÐèҪʹÓúܶàÈß³¤µÄ DOM API£¬¶ø LINQ to XML ÔòÍêÈ«¿ÉÒÔÓÃÓë DOM Î޹صķ½Ê½Óë XML Îĵµ½»»¥¡£ÕâÑù²»µ«´ó´ó¼õÉÙÁË´úÂëÐУ¬¶øÇÒÕâÖÖ±à³ÌÄ£ÐÍ¿ÉÒÔÖ±½ÓÓ³Éäµ½¸ñʽÁ¼ºÃµÄXMLÎĵµ½á¹¹¡£
static void CreateFunctionalXmlElement()
{
// A "functional" approach to build an
// XML element in memory.
XElement inventory =
new XElement("Inventory",
new XElement("Car", new XAttribute("ID", "1"),
new XElement("Color", "Green"),
new XElement("Make", "BMW"),
new XElement("PetName", "Stan")
)
);
// Call ToString() on our XElement.
Console.WriteLine(inventory);
}
ÔÚÄÚ´æÖд´½¨XMLÎĵµ
        static void CreateFunctionalXmlDoc()
        {
            XDocument inventoryDoc =
            new XDocument(
            new XDeclaration("1.0", "utf-8", "yes"),
    &n


Ïà¹ØÎĵµ£º

Android£¨Èý£©Êý¾Ý´æ´¢Ö®XML½âÎö¼¼Êõ

½ñÈÕ¼ÌÐøѧϰAndroidÖÐʹÓÃPullµÄXML½âÎö¼¼ÊõʵÏÖ¶ÔXMLÎļþµÄ½âÎöºÍ´´½¨¡£ÓÉÓÚÃ÷ÌìÐÝÏ¢£¬Ê±¼ä±È½Ï³äÔ££¬ËùÒÔÎÒÒ²½«×òÌìδ×ܽáµÄSAX½âÎö¼¼ÊõÔÚ´Ë×ö¸ö×ܽᡣ
Ò»¡¢SAX½âÎö¼¼Êõ
SaxʹÓõÄÊÇʼþÇý¶¯µÄÁ÷ʽ½âÎö¼¼Êõ¡£Ê¼þÇý¶¯µÄÁ÷ʽ½âÎö·½Ê½ÊÇ£¬´ÓÎļþµÄ¿ªÊ¼Ë³Ðò½âÎöµ½ÎĵµµÄ½áÊø£¬²»¿ÉÔÝÍ£»òµ¹ÍË¡£µ±½âÎöµ½ÎĵµµÄ¿ªÊ¼»ò½áÊø¡ ......

¶ÁÈ¡xml²¢°ó¶¨gridview

<?xml version="1.0" encoding="utf-8" ?>
<ExamPaper Name="ÎҵĵÚÒ»ÆÚÊÔ¾í" BeginDate="2009-3-4" EndDate="2009-12-30" Scort="150" UserTime="100" FK_UserType="1" FK_AdminUser="1">
<Question PKID= ......

FusionCharts µÄXML±êÇ©ÊôÐÔ

FusionCharts µÄ XML±êÇ©ÊôÐÔÓÐÒ»ÏÂËÄÖÖÊý¾ÝÀàÐÍ
* Boolean - ²¼¶ûÀàÐÍ£¬Ö»ÄÜΪ1»òÕß0¡£ÀýÈ磺<graph showNames=’1′ >
* Number - Êý×ÖÀàÐÍ£¬Ö»ÄÜΪÊý×Ö¡£ÀýÈ磺<graph yAxisMaxValue=’200′ >
* String - ×Ö·û´®ÀàÐÍ£¬Ö»ÄÜΪ×Ö·û´®¡£ÀýÈ磺 <graph caption=’My Chart&rsqu ......

ÊÖ´òÔ­xml±Ê¼ÇÊÖ³­±¾

1. <?xml version="1.0" encoding="GB2312" standalone="yes" ?>
       1.1 ÕâÊÇxmlµÄÎĵµÉùÃ÷£¬Ò»°ãλÓÚxmlÎļþµÄÊ×ÐС£
       1.2 Êéд¹æ·¶£º<?xmlΪһÌå Ö®¼ä²»ÄÜÓпոñ¡£
       1.3 encodingÊôÐÔ£¬Èç¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ