Содержание
- 2. XPath - XML Path Language XPath – язык для адресации частей XML документа XPath – открытый
- 3. Цели и задачи, которые решает XPath Эффективный, компактный и логичный синтаксис для указания пути или местоположения
- 4. Краткое знакомство с синтаксисом языка XPath
- 5. Модель дерева XML документа – пример XML документа ]> Jambing on the Trixles Randall, Tristan For
- 6. Модель дерева XML документа – представление XML в виде дерева Корень документа
- 7. Модель дерева XML документа – представление XML в виде дерева catdate="2005-12-31" catnum="id2345" Jambing on the Trixles
- 8. Синтаксис XPath XPath выражения состоят из шагов (location step), которые отделяются символом «/» Объединенные шаги составляют
- 9. Пример - /books/book/author ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 10. Синтаксис XPath Каждый шаг (отсчет идет слева направо) перемещает в дереве на уровень вниз или вверх
- 11. Пример - /books/book/title | /books/book/author ]> Jambing on the Trixles Randall, Tristan For Love of a
- 12. Синтаксис XPath – абсолютные и относительные пути Абсолютный путь – всегда начинается с корневой вершины документа,
- 13. Синтаксис XPath – описание шага (location step) child::price[price=9.90] axis – определяет «направление просмотра» от текущей вершины
- 14. Описание node-test части шага (location step) Указывает тип вершин, или определенные вершины, над полученным набором которых
- 15. Описание node-test части шага – Name tests Здесь чаще всего используется имя нужной вершины Ось (axis)
- 16. Пример - /books/*/author ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 17. Пример - /books/book/* ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 18. Описание node-test части шага – Node Type tests Можно отбирать вершины по их типу comment() –
- 19. Пример - /comment() ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 20. Пример - //text() ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 21. Модель дерева XML документа, используемая XPath XPath рассматривает XML документ как дерево взаимосвязанных ветвей и вершин,
- 22. Знакомство с XPath осями (axes) и взаимоотношением вершин Отношение между вершинами в терминологии языка XPath называется
- 23. Примеры применения осей ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 24. Типы XPath осей (axes) - parent Элемент, непосредственно содержащий данную вершину (элемент, атрибут, инструкцию по обработке,
- 25. Пример parent ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 26. Типы XPath осей (axes) - child Любые вершины (кроме атрибутов и пространств имен), находящиеся непосредственно ниже
- 27. Пример child ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 28. Типы XPath осей (axes) – ancestor Любые вершины, находящиеся выше в иерархии (прародители) Включают также parent
- 29. Пример ancestor ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 30. Типы XPath осей (axes) – descendant Любые вершины, находящиеся ниже в иерархии (потомки) Включают также child
- 31. Пример descendant ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 32. Типы XPath осей (axes) - ancestor-or-self Все ancestor вершины (предки) и сама вершина Для корневой вершины
- 33. Пример ancestor-or-self ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 34. Типы XPath осей (axes) – descendant-or-self Все descendant вершины (потомки) и сама вершина Аббревиатура: // //cd
- 35. Пример descendant-or-self ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 36. Типы XPath осей (axes) – preceding Любые узлы, предшествующие в XML документе текущему, за исключением предков,
- 37. Пример preceding ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 38. Типы XPath осей (axes) – following Любые узлы, следующие в XML документе за текущим , за
- 39. Пример following ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 40. Типы XPath осей (axes) – preceding-sibling Узлы, предшествующие в XML документе текущему и имеющие с ним
- 41. Пример preceding-sibling ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 42. Типы XPath осей (axes) – following-sibling Узлы, следующие в XML документе за текущим и имеющие с
- 43. Пример following-sibling ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 44. Типы XPath осей (axes) – self Текущая вершина Аббревиатура: . ./cd вместо self::node()/cd
- 45. Пример self ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 46. Типы XPath осей (axes) – attribute Атрибуты текущей вершины Ось применима только к элементам Аббревиатура: @
- 47. Пример attribute ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 48. Типы XPath осей (axes) – namespace Пространства имен для данного узла Ось применима только к элементам
- 49. Пример namespace ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey, Jöaut;rg
- 50. Описание predicate части шага (location step) Представляет собой фильтр для отбора из вершин, полученных после node
- 51. Пример - /books/book[author]/title ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 52. Пример - /books/book[author='Randall, Tristan'] ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick
- 53. Пример - /books/book[@catnum='id2345']/author ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 54. Пример - /books/book[1]/author ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 55. Пример - /books/book/author[1] ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 56. Пример - /books/book[last()] ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 57. Пример - /books/book[@catnum='id7823'][1] ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 58. Пример - /books/book[1][@catnum='id7823'] ]> Jambing on the Trixles Randall, Tristan For Love of a Toothpick Frey,
- 59. Пример - /books/book[title and author] ]> Jambing on the Trixles Randall, Tristan For Love of a
- 60. Некоторые полезные функции XPath number position() – позиция текущего элемента в коллекции вершин number last() –
- 61. Некоторые полезные функции XPath string concat(string, string, string*) – объединяет аргументы в одну строку boolean contains(string,
- 62. Некоторые полезные функции XPath number string-length(string) - длина строки string substring(string, number, number?) - возвращает подстроку
- 63. Некоторые полезные функции XPath number ceiling(number) - наименьшее целое, не меньшее аргумента number floor(number) - наибольшее
- 64. Полезные ссылки http://www.w3.org/TR/xpath http://xml.nsu.ru/xpath/xpath_home.xml http://zvon.org/xxl/XPathTutorial/Output_rus/example1.html
- 66. Скачать презентацию