System::Xml::XmlReader::IsStartElement 方法

XmlReader::IsStartElement() method

调用 XmlReader::MoveToContent 并测试当前内容节点是否为开始标签或空元素标签。

virtual bool System::Xml::XmlReader::IsStartElement()

ReturnValue

true if XmlReader::MoveToContent finds a start tag or empty element tag; false if a node type other than XmlNodeType::Element was found.

另见

XmlReader::IsStartElement(String, String) method

调用 XmlReader::MoveToContent 并测试当前内容节点是否为开始标签或空元素标签,以及找到的元素的 XmlReader::get_LocalNameXmlReader::get_NamespaceURI 值是否与给定字符串匹配。

virtual bool System::Xml::XmlReader::IsStartElement(String localname, String ns)
参数类型描述
本地名称String用于匹配找到的元素 LocalName 值的字符串。
nsString用于匹配找到的元素 NamespaceURI 值的字符串。

ReturnValue

true if the resulting node is an element. false if a node type other than XmlNodeType::Element was found or if the LocalName and NamespaceURI values of the element do not match the specified strings.

另见

XmlReader::IsStartElement(String) method

调用 XmlReader::MoveToContent 并测试当前内容节点是否为开始标签或空元素标签,以及找到的元素的 XmlReader::get_Name 值是否与给定参数匹配。

virtual bool System::Xml::XmlReader::IsStartElement(String name)
参数类型描述
名称String该字符串与找到的元素的 Name 值匹配。

ReturnValue

true if the resulting node is an element and the Name value matches the specified string. false if a node type other than XmlNodeType::Element was found or if the element Name value does not match the specified string.

另见