XmlHelperGetAttributeValue Method (String, String, String) | Helper帮助文档 |
获取指定XPath表达式节点的属性值
Namespace: HD.Common
Assembly: HD.Common (in HD.Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static string GetAttributeValue( string xmlFilePath, string xPath, string attributeName )
Public Shared Function GetAttributeValue ( xmlFilePath As String, xPath As String, attributeName As String ) As String
public: static String^ GetAttributeValue( String^ xmlFilePath, String^ xPath, String^ attributeName )
static member GetAttributeValue : xmlFilePath : string * xPath : string * attributeName : string -> string
Parameters
- xmlFilePath
- Type: SystemString
Xml文件的相对路径 - xPath
- Type: SystemString
XPath表达式, 范例1: @"Skill/First/SkillItem", 等效于 @"//Skill/First/SkillItem" 范例2: @"Table[USERNAME='a']" , []表示筛选,USERNAME是Table下的一个子节点. 范例3: @"ApplyPost/Item[@itemName='岗位编号']",@itemName是Item节点的属性. - attributeName
- Type: SystemString
属性名
Return Value
Type: String[Missing <returns> documentation for "M:HD.Common.XmlHelper.GetAttributeValue(System.String,System.String,System.String)"]
See Also