In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
XPath simple and practical learning Selenium2
In order to learn the element positioning to start learning xpath, now record the learning experience for your reference.
What is XPath?
XPath uses path expressions to navigate through XML documents
XPath contains a standard function library
XPath is the main element in XSLT
XPath is a W3C standard
In XPath, there are seven types of nodes: elements, attributes, text, namespaces, processing instructions, comments, and document (root) nodes. XML documents are treated as node trees. The root of a tree is called a document node or root node.
The most useful path expressions are listed below:
Expression.
Description
Nodename
Select all the children of this node.
/
Select from the root node.
/ /
Selects nodes in the document from the current node that matches the selection, regardless of their location.
.
Select the current node.
..
Select the parent node of the current node.
@
Select the attribute.
Select unknown node
XPath wildcards can be used to select unknown XML elements.
Wildcard character
Description
*
Matches any element node.
@ *
Matches any attribute node.
Node ()
Matches any type of node.
Learn by yourself:
1. Take a look at the xpath rules
2. Install Firefox plug-ins Firebug, FirePath, ViewXpath plug-ins
Comparative learning:
See XPath:.//* [@ id='su']; remember this [. / / * [@ =]]
open
Try to write it.
Install this rule to write whether other locations can also be displayed:
Hands-on practice, will be a simple positioning, this is today took a little time, learn, thank the older teachers.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.