- 浏览: 373180 次
- 性别:
- 来自: 青岛
文章分类
最新评论
-
lippeng:
楼主,你好!这篇中提到的一个话题,是我现在非常关心的,我自己还 ...
使用JUnit测试通过 HttpClient(https协议)访问支付宝接口时不能自动获得证书的解决办法 -
snoopy7713:
[2014-03-14 17:55:06.651] TCP ...
刚完成Struts的Virgo插件,分享一下设计思路和Virgo OSGi内部的独特机制 -
snoopy7713:
需要看一下,你的代码说的挺模糊的。我的联系方式QQ 16200 ...
刚完成Struts的Virgo插件,分享一下设计思路和Virgo OSGi内部的独特机制 -
roronjavaeye:
不错,受教了
java_class反编译后的代码还原 -
daoyongyu:
讲的很好,很详细。
Struts2配置文件详解——struts.properties
先看一下w3school上的定义,如下(自己翻译的,可能会有一点有妥):
XPath是一种可以在XML文档中寻找信息的语言
( XPath is a language for finding information in an XML document. )
XPath是可以查找XML文档中的元素和属性
(XPath is used to navigate through elements and attributes in an XML document.)
XPath是W3C的XSLT的标准的一个主要组成部分( XPath is a major element in the W3C's XSLT standard )
并且XQuery和XPointer都是基于XPath而建立起来的( and XQuery and XPointer are both built on XPath expressions. )
参见:http://www.w3schools.com/xpath/default.asp
学习所需的基础知识:
- HTML / XHTML
- XML / XML Namespaces
什么是XPath?
-
- XPath is a syntax(语法) for defining parts of an XML document
- XPath uses path expressions(路径表达式) to navigate(导航,定位) in XML documents
- XPath contains a library of standard functions (包含一些标准函数库)
- XPath is a major element in XSLT (XSLT的主要构成部份)
- XPath is a W3C Standard (W3C的一个标准)
XPath Path Expressions(路径表达式)
XPath uses path expressions to select nodes(节点) or node-sets(节点集) in an XML document. These path expressions look very much like the expressions you see when you work with a traditional computer file system.
XPath通过路径表达式来选择XML文档中的节点或节点集,这些表达式很像那些传统的电脑文件系统的表达式.
XPath Standard Functions(标准函数)
XPath includes over 100 built-in functions. There are functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more.
XPath 包含100多个内建函数,这些函数可以返回字符串值,数值,日期和时间的比较值,节点和QName操作,因果关系操作,布尔值,还有其它等.
XPath is Used in XSLT
XPath is a major element in the XSLT standard. Without XPath knowledge you will not be able to create XSLT documents.
没有XPath知识你将不能创建有效的,灵活的XSLT文档
XQuery and XPointer are both built on XPath expressions. XQuery 1.0 and XPath 2.0 share the same data model and support the same functions and operators.
XQuery 1.0 和 XPath 2.0有共同的数据模式,支持相同的函数和操作
XPath is a W3C Standard
XPath became a W3C Recommendation(推荐,提议) 16. November 1999.
XPath was designed to be used by XSLT, XPointer and other XML parsing(分析,解析) software.
XPath Terminology术语
In XPath, there are seven kinds of nodes(七种节点): element, attribute, text, namespace, processing-instruction, comment, and document (root) nodes.
在 XPath中,共有七种节点:元素,属性,文本,名字空间,处理指令,注释和文档根节点
看下面这个例子:
<?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> </bookstore> |
上例中的节点
<bookstore> (document node) <author>J K. Rowling</author> (element node) lang="en" (attribute node) |
Atomic values(原子值)
Atomic values are nodes with no children or parent.
原子值是没有子节点和父节点的节点
如上例中的:
J K. Rowling "en" |
Items
Items are atomic values or nodes.
Relationship of Nodes节点间关系
Parent父
Each element and attribute has one parent.每个元素和属性只有一个父节点
In the following example; the book element is the parent of the title, author, year, and price:
下例中book元素是title, author, year, 和 price的父节点:
<book> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> |
Children子
Element nodes may have zero, one or more children.元素的节点可以是零个,一个或多个
In the following example; the title, author, year, and price elements are all children of the book element:
<book> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> |
Siblings同胞,同科,平行
Nodes that have the same parent.具有相同父节点的节点
In the following example; the title, author, year, and price elements are all siblings:下例中,title, author, year, 和 price 元素都是同科
<book> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> |
Ancestors祖先,根
A node's parent, parent's parent, etc.一个节点的父节点,父节点的父节点
In the following example; the ancestors of the title element are the book element and the bookstore element:
下例中,title元素的根是book和bookstore元素
<bookstore> <book> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> </bookstore> |
Descendants胄
A node's children, children's children, etc.一个节点的子节点,子节点的子节点
In the following example; descendants of the bookstore element are the book, title, author, year, and price elements:
下例中,bookstore元素的胄是book,title,author,year和price元素
<bookstore> <book> <title>Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> </bookstore> |
XPath Syntax 语法
XPath uses path expressions to select nodes or node-sets in an XML document. The node is selected by following a path or steps.
XPath使用路径表达式在XML文档中选择节点或节点套,节点的选择通过以下方式
The XML Example Document
XML例子
We will use the following XML document in the examples below.我们用下面的XML文档来做为范例
<?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <title lang="eng">Harry Potter</title> <price>29.99</price> </book> <book> <title lang="eng">Learning XML</title> <price>39.95</price> </book> </bookstore> |
Selecting Nodes选择节点
XPath uses path expressions to select nodes in an XML document. The node is selected by following a path or steps.
XPath使用路径表达式在XML文档中选择节点或节点套,节点的选择通过以下方式
The most useful path expressions are listed below:
最常用的路径表达式如下:
Expression | Description |
nodename节点名 | Selects all child nodes of the node 选择指定节点的所有子节点 |
/ | Selects from the root node 从根节点来始选择 |
// |
Selects nodes in the document from the current node that match the selection no matter where they are 在文档中从当前节点开始选择,不管它们在哪里,只要它们符合条件 |
. | Selects the current node 选择当前的节点 |
.. | Selects the parent of the current node 选择当前节点的父节点 |
@ | Selects attributes 选择属性 |
Examples
In the table below we have listed some path expressions and the result of the expressions:
在下面的表格里,我们例举了一些路径表达式和它们的结果
Path Expression | Result |
bookstore | Selects all the child nodes of the bookstore element 选择bookstore元素的所有子节点 |
/bookstore | Selects the root element bookstore 选择根节点bookstore
Note: If the path starts with a slash ( / ) it always represents an absolute path to an element! 注:如果路径以"/"开始,它通常表示一绝对路径 |
bookstore/book |
Selects all book确良elements that are children of bookstore 选择bookstore所有的book元素 |
//book |
Selects all book elements no matter where they are in the document 选择所有的book元素,无论它们在文档的什么地方 |
bookstore//book |
Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element 选择所有的bookstore的胄book 元素,不管它们在哪,只要在bookstore元素内 |
//@lang |
Selects all attributes that are named lang 选择所有的名字为lang的属性 |
Predicates谓词
Predicates are used to find a specific node or a node that contains a specific value.
谓词用于查找一个指定的节点或一个包含一个指定值的节点
Predicates are always embedded in square brackets.
谓词通常嵌写在一对方括号内
Examples例
In the table below we have listed some path expressions with predicates and the result of the expressions:
在下面的表格中我们例举了一些使用了谓词的路径表达式和它们的结果
Path Expression | Result |
/bookstore/book[0] |
Selects the first book element that is the child of the bookstore element. 选择bookstore元素的第一个book 元素 Note: IE5 and later has implemented that [0] should be the first node, but according to the W3C standard it should have been [1]!! 注: IE5 和更高的版本指明[0]表示第一个节点,但是根据W3C的标准,应该是 [1]表示第一个节点 |
/bookstore/book[last()] |
Selects the last book element that is the child of the bookstore element 选择bookstore元素的最后一个book 元素 |
/bookstore/book[last()-1] |
Selects the last but one book element that is the child of the bookstore element 选择bookstore元素的倒数第二个book 元素 |
/bookstore/book[position()<3] |
Selects the first two book elements that are children of the bookstore element 选择bookstore元素的前两个book 元素 |
//title[@lang] |
Selects all the title elements that have an attribute named lang 选择所有具有lang属性的title元素 |
//title[@lang='eng'] |
Selects all the title elements that have an attribute named lang with a value of 'eng' 选择所有的,lang属性值为'eng'的 title 元素 |
/bookstore/book[price>35.00] |
Selects all the book elements of the bookstore element that have a price element with a value greater than 35.00 选择所有了bookstore 的 book 元素,且book 元素的price 元素的值大于35.00 |
/bookstore/book[price>35.00]/title |
Selects all the title elements of the book elements of the bookstore element that have a price element with a value greater than 35.00 选择所有的bookstore元素的 book 的 title元素,且book 元素的price 元素的值大于35.00 |
Selecting Unknown Nodes
XPath wildcards can be used to select unknown XML elements.
Wildcard | Description |
* | Matches any element node 匹配任何元素节点 |
@* | Matches any attribute node 匹配任何属性节点 |
node() | Matches any node of any kind 匹配任何种类的节点 |
Examples
In the table below we have listed some path expressions and the result of the expressions:
Path Expression | Result |
/bookstore/* |
Selects all the child nodes of the bookstore element 选择所有的bookstore元素的子节点 |
//* |
Selects all elements in the document 选择文档中所有的元素 |
//title[@*] |
Selects all title elements which have any attribute 选择的有属性的title元素 |
Selecting Several Paths选择几条路径
By using the | operator in an XPath expression you can select several paths.
在XPath表达式中通过使用"|"操作符可以来选择几条路径
Examples
In the table below we have listed some path expressions and the result of the expressions:
Path Expression | Result |
//book/title | //book/price |
Selects all the title AND price elements of all book elements 选择book元素的所有title 和price 元素 |
//title | //price |
Selects all the title AND price elements in the document 选择文档中所有的title 和price 元素 |
/bookstore/book/title | //price |
Selects all the title elements of the book element of the bookstore element AND all the price elements in the document 选择bookstore元素的book元素的所有title和 文档中所有的price 元素 |
XPath Axes轴,轴线,轴心
XPath的主线
The XML Example Document
We will use the following XML document in the examples below.
<?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <title lang="eng">Harry Potter</title> <price>29.99</price> </book> <book> <title lang="eng">Learning XML</title> <price>39.95</price> </book> </bookstore> |
XPath Axes
An axis defines a node-set relative to the current node.
一条主线指定了一系列的节点和当前节点的关系
AxisName | Result |
ancestor |
Selects all ancestors (parent, grandparent, etc.) of the current node 选择当前节点的所有的祖先,根,(父,父之父) |
ancestor-or-self |
Selects all ancestors (parent, grandparent, etc.) of the current node and the current node itself 选择当前节点所有的祖节点和自己 |
attribute |
Selects all attributes of the current node 选择当前节点的所有属性 |
child |
Selects all children of the current node 选择当前节点的所有子节点 |
descendant |
Selects all descendants (children, grandchildren, etc.) of the current node 选择当前节点的所有胄(子,子之子等) |
descendant-or-self |
Selects all descendants (children, grandchildren, etc.) of the current node and the current node itself 选择当前节点的所有子节点和自己 |
following |
Selects everything in the document after the closing tag of the current node 选择当前节点结束后的文档中的所有节点 |
following-sibling |
Selects all siblings after the current node 选择当前节点后的所有同科节点 |
namespace |
Selects all namespace nodes of the current node 选择当前节点的所有的名字空间 |
parent |
Selects the parent of the current node 选择当前节点的所有父节点 |
preceding |
Selects everything in the document that is before the start tag of the current node 选择文档中当前节点前的所有节点 |
preceding-sibling |
Selects all siblings before the current node 选择当前节点前的所有同科节点 |
self |
Selects the current node 选择当前节点 |
Location Path Expression位置表达式
A location path can be absolute or relative.
可以是绝对的也可以是相对的确良
An absolute location path starts with a slash ( / ) and a relative location path does not. In both cases the location path consists of one or more steps, each separated by a slash:
一个绝对的路径以"/"开始,两种表示式都有一级或多级构成,级用"/"分开
An absolute location path: /step/step/... A relative location path: step/step/... |
Each step is evaluated against the nodes in the current node-set.
每一级都是根据当前节点的在节点集的位置来执行的
A step consists of:级构成:
- an axis (defines the tree-relationship between the selected nodes and the current node) 主线(规定一个当前节点和所先节点的关系树)
- a node-test (identifies a node within an axis) 一个节点测试(在主线中辨认一个节点)
- zero or more predicates (to further refine the selected node-set) 一个或多个谓词(进一步挑选选定的节点集)
The syntax for a location step is:语法
axisname::nodetest[predicate] |
Examples
Example | Result |
child::book |
Selects all book nodes that are children of the current node 选择当前节点的所有的book节点 |
attribute::lang |
Selects the lang attribute of the current node 选择当前节点的lang 属性 |
child::* |
Selects all children of the current node 选择当前节点的所有子节点 |
attribute::* |
Selects all attributes of the current node 选择当前节点的所有属性 |
child::text() |
Selects all text child nodes of the current node 选择当前节点的所有文本子节点 |
child::node() |
Selects all child nodes of the current node 选择当前节点的所有子节点 |
descendant::book |
Selects all book descendants of the current node 选择当节点的所有book胄 |
ancestor::book |
Selects all book ancestors of the current node 选择当前节点的所有book节点的祖,根 |
ancestor-or-self::book |
Selects all book ancestors of the current node - and the current as well if it is a book node 选择当前节点的book元素的根节点或它自己(如果它也是一个book节点的话) |
child::*/child::price | Selects all price grandchildren of the current node |
XPath Operators操作符
An XPath expression returns either a node-set, a string, a Boolean, or a number.
一个 XPath 表达式可以返回一个节点集,一个字符串,一个布尔值,或一个数值
XPath Operators
Below is a list of the operators that can be used in XPath expressions:
下面是一些可以用在XPath表达式中的操作符的清单:
Operator | Description | Example | Return value |
| |
Computes two node-sets 返回两个节点集 |
//book | //cd |
Returns a node-set with all book and cd elements 返回一个所有book 元素和cd元素的节点集 |
+ | Addition加 | 6 + 4 | 10 |
- | Subtraction减 | 6 - 4 | 2 |
* | Multiplication乘 |
6 * 4 |
24 |
div | Division除 | 8 div 4 | 2 |
= | Equal等于 | price=9.80 | true if price is 9.80 false if price is 9.90 |
!= | Not equal不等于 | price!=9.80 | true if price is 9.90 false if price is 9.80 |
< | Less than小于 | price<9.80 | true if price is 9.00 false if price is 9.80 |
<= | Less than or equal to小于等于 | price<=9.80 | true if price is 9.00 false if price is 9.90 |
> | Greater than大于 | price>9.80 | true if price is 9.90 false if price is 9.80 |
>= |
Greater than or equal to大于等于 |
price>=9.80 | true if price is 9.90 false if price is 9.70 |
or | or或 | price=9.80 or price=9.70 | true if price is 9.80 false if price is 9.50 |
and | and 且 | price>9.00 and price<9.90 | true if price is 9.80 false if price is 8.50 |
mod | Modulus (division remainder)取余 | 5 mod 2 | 1 |
XPath Examples
实例
Let's try to learn some basic XPath syntax by looking at some examples.
通过实例学习基本的xpath语法
The XML Example Document
We will use the following XML document in the examples below.
使用下面的xml文档来做为范例
"books.xml":
<?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="WEB"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> |
View the "books.xml" file in your browser 点击查看 .
Selecting Nodes 选择节点
We will use the Microsoft XMLDOM object to load the XML document and the selectNodes() function to select nodes from the XML document:
我们通过使用Microsoft 的XMLDOM对象来加载XML文档和selectNodes() 函数来从XML文档中选择节点
set xmlDoc=CreateObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("books.xml") xmlDoc.selectNodes(path expression ) |
Select all book Nodes选择所有的book节点
The following example selects all the book nodes under the bookstore element:
下例选择bookstore元素的所有的book 节点
xmlDoc.selectNodes("/bookstore/book") |
If you have IE 5 or higher you can try it yourself .
Select the First book Node选择第一个book节点
The following example selects only the first book node under the bookstore element:
xmlDoc.selectNodes("/bookstore/book[0]") |
If you have IE 5 or higher you can try it yourself
Note: IE5 and later has implemented that [0] should be the first node, but according to the W3C standard it should have been [1]!!
注:W3C标准为使用[1]来选择第一个
A Workaround!
To solve the [0] and [1] problem in IE5+, you can set the SelectionLanguage to XPath.
为了解决这个问题,你可以通过为XPath设置SelectionLanguage
The following example selects only the first book node under the bookstore element:
xmlDoc.setProperty "SelectionLanguage", "XPath" xmlDoc.selectNodes("/bookstore/book[1]") |
Select the prices
选择price元素
The following example selects the text from all the price nodes:
xmlDoc.selectNodes("/bookstore/book/price/text()") |
If you have IE 5 or higher you can try it yourself .
Selecting price Nodes with Price>35
选择price值大于35的元素
The following example selects all the price nodes with a price higher than 35:
xmlDoc.selectNodes("/bookstore/book[price>35]/price") |
If you have IE 5 or higher you can try it yourself .
Selecting title Nodes with Price>35
选择值price大于35的title元素
The following example selects all the title nodes with a price higher than 35:
xmlDoc.selectNodes("/bookstore/book[price>35]/title")
XSLT全称eXtended Stylesheet Language Transformation
xslt文件头
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
重要标签解析
<xsl:template match="xpath"> 该标签用于定义模版,同时分配给指定结点
<xsl:apply-templates select="xpath"> 该标签用于指定要应用模版的结点
提示:
xsl:template中可以再次使用xsl:apply-templates,用于样式的多级嵌套
实例1:
planets.xml
<?xml-stylesheet type="text/xsl" href="planets.xslt"?>
<planets>
<planet color="red">
<name>Mercury</name>
<mass units="(Earth=1)">.0553</mass>
<day units="days">58.65</day>
<radius units="miles">1516</radius>
<density units="(Earth=1)">.983</density>
<distance units="million miles">43.4</distance>
</planet>
<planet color="yellow">
<name>Venus</name>
<mass units="(Earth=1)">.815</mass>
<day units="days">116.75</day>
<radius units="miles">3716</radius>
<density units="(Earth=1)">.943</density>
<distance units="million miles">66.8</distance>
</planet>
</planets>
planets.xslt
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="planet">
<p><xsl:value-of select="name"/></p>
</xsl:template>
以上例子中,先对所有结点使用<xsl:apply-templates>,然后再使用<xsl:template>对planet结点作处理
<xsl:attribute> 可为html标签添加属性
实
例2:<a><xsl:attribute name="href"
select="http://www.cnblogs.com"></a>该语句生成的结果为<a
href="http://www.cnblogs.com"></a>
<xsl:value-of select="xpath"> 获得结点的值
语法结构的使用
1. 类似于if(){...}else{}的语法
</xsl:if>
2. 类似于switch(){case n: ...}的语法
<xsl:when test="condition"> </xsl:when>
<xsl:when test="condition"> </xsl:when>
<xsl:otherwise> </xsl:otherwise>
</xsl:choose>
3.foreach语法
</xsl:for-each>
4.模版函数定义
<xsl:param name=”parameter1”/>
<xsl:param name="parameter2" select="defaultvalue"/>
</xsl:template>
其中,parameter2使用select属性指定了默认值defaultvalue。
对于模版函数中的参数可以用$variable来引用
实例3
<xsl:with-param name="parameter1"/>
<xsl:value-of select="$parameter1"/>
</xsl:call-template>
5.模版函数调用
<xsl:with-param name="parameter1" select="parameter value"/>
...
</xsl:call-template>
在IE中使用xslt的注意点
- 在xml中引用xslt时,必须把type=”text/xml”改为type=”text/xsl”
- 必须先匹配根结点后,再匹配其他结点,否则可能无法显示,即match=”/”
- IE浏览器不支持任何XSLT默认规则,因此必须自己写
添加javascript代码时的注意点
如果要在<script language="javascript"></script>中添加代码,必须使用<![CDATA[...]]>,因为添加的代码没有人任何标记,会使xslt文件不符合xml格式规范
相关推荐
**XSLT自动代码生成学习笔记** XSLT(Extensible Stylesheet Language Transformations)是一种强大的XML转换语言,常用于将XML数据转换成其他格式,如HTML、PDF或纯文本。在软件开发中,XSLT被广泛应用于自动代码...
通过《XML笔记》和《XSLT中文入门》的学习资料,你可以深入了解XML的语法和语义,以及XSLT的工作原理和实践技巧。《XML笔记.doc》可能包含了XML的基本概念、实例和最佳实践;而《XSLT中文入门.doc》可能详细讲解了...
《Java JDK 6 学习笔记》这本书很可能是为了帮助读者深入理解和掌握这个版本的Java编程语言及其开发环境。以下是一些关键知识点的详细说明: 1. **自动装箱与拆箱**:Java 6中引入了自动装箱和拆箱功能,使得基本...
【Nginx学习笔记】 Nginx是一款由俄罗斯开发者Igor Sysoev设计的高性能、高并发的Web服务器和反向代理服务器。最初应用于俄罗斯知名网站www.rambler.ru,随后开源,采用类BSD许可,使得全球用户都能使用。Nginx以其...
本项目是针对JavaWeb核心阶段的全面学习笔记源码,采用Html语言编写,并辅以CSS、Python和Shell脚本,共计包含392个文件,涵盖185个HTML页面、65张JPG图片、63个SVG图像、26个XML配置文件、21个Markdown文档、9个GIF...
标题"Dom4j学习教程+API+xml实用大全+xml学习笔记+htc"提及了几个关键主题,包括Dom4j的学习资源、API文档,以及关于XML的实用指南和学习笔记,还提到了一个名为"htc"的文件,可能是关于HTC设备或技术的文档。...
**Java JDK6 学习笔记概述** Java JDK6(Java Development Kit 6)是Oracle公司发布的一个用于开发Java应用程序的重要工具集,包含了JRE(Java Runtime Environment)和一系列的开发和调试工具。这个版本的JDK发布...
本资料包“java学习笔记JDK6课件和课本代码”专注于JDK6版本的学习,这个版本是Java历史上的一个重要里程碑,引入了许多新特性并优化了性能。 首先,我们来了解JDK6的一些关键特性: 1. **增强的泛型**:JDK6对...
"良葛格"的Java JDK 6.0学习笔记旨在帮助初学者和有经验的程序员深入理解这一版本的Java语言特性,以及如何利用JDK 6.0进行开发。 一、JDK 6.0主要特性 1. **自动内存管理**:Java 6引入了更高效的垃圾回收机制,...
XML,全称Extensible Markup Language,可扩展标记语言,是一种用于标记数据的结构化语言,...通过这些学习资料,你将能够深入理解XML的各个方面,从基础语法到高级用法,从而在实际工作中更有效地处理和利用XML数据。
学习XSL的过程中,理解XSLT的模板匹配机制至关重要。你需要掌握如何定义模板,以及`<xsl:apply-templates>`和`<xsl:copy-of>`元素的使用,它们分别用于应用模板和复制节点。此外,XPath的熟练运用也是关键,包括节点...
它被广泛应用于XML处理,如XSLT、XQuery以及XPointer等标准中。XPath通过路径表达式来选取XML文档中的元素、属性或其他类型的节点,使得我们可以方便地访问和操作XML数据。 1. XPath简介 XPath的核心在于其路径...
这份学习笔记涵盖了从操作系统基础到数据库应用的广泛主题,是Java初学者或希望巩固基础的开发者的重要资源。 1. **Unix学习基础**:Unix是许多服务器和开发环境常用的操作系统。了解Unix的基础知识,包括文件系统...
Solr学习笔记 Solr 是一种基于 Lucene 的搜索服务器,可以满足企业对搜索解决方案的需求。它支持层面搜索、命中醒目显示和多种输出格式,易于安装和配置,並且附带了一个基于 HTTP 的管理界面。 Solr 的主要特点...
本资料集合主要关注的是JDK 6版本的学习笔记和相关课件,这一版本在2006年发布,是Java发展历程中的一个重要里程碑。 1. **Java基础知识**:Java是一种面向对象的语言,它的核心特性包括平台无关性、自动内存管理...
**JSTL(JavaServer Pages Standard Tag Library)**是Java Web开发中的一种标准标签库,它为JSP...JSTL的学习笔记对于Java开发爱好者来说是一份宝贵的参考资料,可以帮助他们快速掌握JSTL的用法并应用于实际项目中。
### Nutch 学习笔记之第一天初学 在IT领域,特别是搜索引擎开发和技术研究方向,Apache Nutch无疑是一个值得关注的开源项目。Nutch是Apache软件基金会的一个子项目,旨在为开发者提供一个高度可扩展且可定制化的...
【XML 高级学习笔记】 XML(Extensible Markup Language)是一种可扩展标记语言,与HTML类似,但其设计目标是存储和传输数据,而非呈现数据。XML允许用户自定义标签,使得它成为一种自描述的语言,并且是W3C的标准...
【PHP学习笔记】深入解析 PHP,全称“PHP: Hypertext Preprocessor”,是一种广泛使用的开源脚本语言,尤其适用于Web开发。与客户端JavaScript不同,PHP代码在服务器端执行,这意味着它可以处理表单数据、生成动态...