- Xmldocument xml =NewXmldocument ();
-
- XML. Load ("D: \ XML \ sellgame. xml")
-
- Xmlnamespacemanager nsmgr =
-
- NewXmlnamespacemanager (NewXmldocument (). nametable );
-
- // Create an XML namespace manager object
-
- Nsmgr. addnamespace ("V","Www-shop-game");
- // Add a namespace, C # Read XML for XML operations
-
- StringPrice = xml. selectsinglenode (
-
- "V: Games/V: Game [@ name = 'civilization 3']/price", Nsmgr). innertext;
-
- // Obtain the corresponding node Value
* ***** ReadAll civilizations 3*************************************** **************************************** ***
-
- Xmlnamespacemanager nsmgr =
- NewXmlnamespacemanager (
-
- NewXmldocument (). nametable );
-
- // Create an XML namespace manager object
-
- Nsmgr. addnamespace ("V","Www-shop-game");
-
- // Add a namespace, C # Read XML for XML operations
-
- Xmlnodelist nodelist = xml. selectnodes (
- "V: Games/V: Game [@ name = 'civilization 3']/price", Nsmgr );
-
- // Obtain the corresponding node Array
****************************** **************************************** ************
-
- <? XML version ="1.0"Encoding ="UTF-8"? >
-
- <V: Games xmlns: V ="Www-shop-game">
- <V: Game name ="Civilization 3"Type ="Standard">
-
- <Price> 100 </price>
-
- </Game> // C # Read XML for XML operations
-
- <V: Game name ="Civilization 3"Type ="Classic">
-
- <Price> 500 </price>
-
- </Game>
- <V: Game name ="Age of Empire">
-
- <Price> 200 </price>
-
- </Game>
-
- </Games>