XmlHelperGetValue Method (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 GetValue( string xmlFilePath, string xPath )
Public Shared Function GetValue ( xmlFilePath As String, xPath As String ) As String
public: static String^ GetValue( String^ xmlFilePath, String^ xPath )
static member GetValue : xmlFilePath : string * xPath : 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节点的属性.
Return Value
Type: String[Missing <returns> documentation for "M:HD.Common.XmlHelper.GetValue(System.String,System.String)"]
See Also