ÈçºÎÔÚ XML ÎļþÖÐÈ¡µÃÖ¸¶¨ÊôÐÔµÄÏà¹ØÖµ£¿
Á½ÖÖ·½·¨£º
ÆäÒ»£¬Ê¹Óà SelectNodes µÄ·½·¨£»ÒÔÏÂÀý×ÓΪʹÓô˷½·¨µÄ´¦Àí¡£
Æä¶þ£¬Ê¹Óà XQuery µÄ·½·¨¡£
''' <summary>
''' ´Ó XML ÎļþÖÐÈ¡µÃ¶ÔÓ¦ID µÄÓïÑÔÖµ
''' </summary>
''' <param name="textID">ÊäÈëµÄID</param>
''' <returns></returns>
''' <remarks></remarks>
Private Shared Function GetLanguageTextfromXML(ByVal textID As String) As LangText
Dim _return As LangText = Nothing
Try
If Not IsNothing(_xmlDoc) Then
Dim nodeList As XmlNodeList
nodeList = _xmlDoc.SelectNodes("//item[@text_id='" & textID.ToLower & "']")
Dim node As XmlNode
Dim _languageID As String '= IIf(Language = eLanguage.English, "ENG", "CHN")
For Each node In nodeList
_languageID = node.Attributes("language").Value.ToUpper
Select Case _languageID
Case "ENG"
 
Ïà¹ØÎĵµ£º
дXML£º
protected void btnSave_Click(object sender, EventArgs e)
{
//ȨÏÞÅжÏ
XmlTextWriter xmlw = new XmlTextWriter(Server.MapPath("~\\") + "FriendLink.xml", Encoding.Ge ......
ÔںܶàÇé¿öÏÂ, ÎÒÃÇ»áÓõ½XML,±ÈÈç˵ÅäÖÃÎļþµÈ.C#ÌṩÁËXMLÀà.
ÕâÀïÎÒÖ»ÊǼòµ¥µÄдһÏÂXMLÎļþµÄÉú³É,½âÎö¾Í²»¶à˵ÁË.
µÚÒ»ÖÖ·½·¨
DataBase db = DataBaseFactory.CreateDataBase(DataBaseType.MySql, strMysql);
......
Ò»£ºSpringÖеļ¸ÖÖÈÝÆ÷¶¼Ö§³ÖʹÓÃxml×°Åäbean£¬°üÀ¨£º
XmlBeanFactory £¬
ClassPathXmlApplicationContext £¬
FileSystemXmlApplicationContext £¬
XmlWebApplicationContext
¼ÓÔØÕâЩÈÝÆ÷µÄÅäÖÃÎļþµÄxmlÓÐһϼ¸ÖÖ³£¼ûµ ......
×÷Õß: J. Andrew Schafer
ÕâƪÎÄÕ¼ÙÉèÄã¶Ô XML, XSLT, ºÍ C# ÊìϤ
ÏÂÔØÕâƪÎÄÕµÄÔ´´úÂë: XMLC.exe (76KB)
ÒëÕß˵Ã÷£ºÕâƪÎÄÕÂÊǺÜÔçÒÔÇ°¾Í·¢±íÁË£¬ËüÌṩµÄÔ´´úÂëÊÇ»ùÓÚ VS.net ²âÊ԰棨RTM ºÍ Beta 2£©µÄ¡£
ÕªÒª
C# ÔÊÐí¿ª·¢ÈËÔ±ÔÚÔ´´úÂëÖвåÈëXML×¢ÊÍ£¬ÕâÔÚ¶àÈËÐ×÷¿ª·¢µÄʱºòÏÔµÃÌرðÓÐÓᣠ......
import java.io.StringWriter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.apache.xerces.dom.DocumentImpl;
import org.apache.xerces.dom.DOMImplementationImpl;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.Serializer;
import org.apache.xml. ......