HtmlTagInnerTextParser.GetInnerTextForHtmlTags 方法 (String, String, String, Boolean, Boolean, Boolean)

返回与指定参数匹配的所有内部文本的可枚举列表。

命名空间:  Microsoft.VisualStudio.TestTools.WebTesting
程序集:  Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)

语法

声明
Public Function GetInnerTextForHtmlTags ( _
    tagName As String, _
    attributeName As String, _
    attributeValue As String, _
    hasClosingTag As Boolean, _
    removeInnerTags As Boolean, _
    collapseWhiteSpace As Boolean _
) As IEnumerable(Of HtmlTagInnerText)
public IEnumerable<HtmlTagInnerText> GetInnerTextForHtmlTags(
    string tagName,
    string attributeName,
    string attributeValue,
    bool hasClosingTag,
    bool removeInnerTags,
    bool collapseWhiteSpace
)
public:
IEnumerable<HtmlTagInnerText^>^ GetInnerTextForHtmlTags(
    String^ tagName, 
    String^ attributeName, 
    String^ attributeValue, 
    bool hasClosingTag, 
    bool removeInnerTags, 
    bool collapseWhiteSpace
)
member GetInnerTextForHtmlTags : 
        tagName:string * 
        attributeName:string * 
        attributeValue:string * 
        hasClosingTag:bool * 
        removeInnerTags:bool * 
        collapseWhiteSpace:bool -> IEnumerable<HtmlTagInnerText> 
public function GetInnerTextForHtmlTags(
    tagName : String, 
    attributeName : String, 
    attributeValue : String, 
    hasClosingTag : boolean, 
    removeInnerTags : boolean, 
    collapseWhiteSpace : boolean
) : IEnumerable<HtmlTagInnerText>

参数

  • attributeName
    类型:System.String
    要匹配的特性的名称。
  • attributeValue
    类型:System.String
    要匹配的特性的值。
  • hasClosingTag
    类型:System.Boolean
    指定该标记是否具有结束标记。
  • removeInnerTags
    类型:System.Boolean
    如果要从内部文本中筛选出 HTML 标记,则为 true;否则为 false。
  • collapseWhiteSpace
    类型:System.Boolean
    如果要折叠 HTML 文档中的多余空格,则为 true;否则为 false。

返回值

类型:System.Collections.Generic.IEnumerable<HtmlTagInnerText>
与标记匹配的内部文本的可枚举列表。

.NET Framework 安全性

请参见

参考

HtmlTagInnerTextParser 类

GetInnerTextForHtmlTags 重载

Microsoft.VisualStudio.TestTools.WebTesting 命名空间