1 / 11

xPath - Abfragen

xPath - Abfragen. XML-Path Language ( xPath ) ist eine Empfehlung des W3C es wurde entwickelt, um durch ein XML-Dokument zu navigieren und ist ein großer Teil von XSLT. Ausgehend von der Baumstruktur lässt sich jedes Element ansteuern Die verschiedenen Arten von Knoten sind: Element

snana
Télécharger la présentation

xPath - Abfragen

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. xPath - Abfragen

  2. XML-Path Language (xPath) ist eine Empfehlung des W3C es wurde entwickelt, um durch ein XML-Dokument zu navigieren und ist ein großer Teil von XSLT

  3. Ausgehend von der Baumstruktur lässt sich jedes Element ansteuern Die verschiedenen Arten von Knoten sind: • Element • Attribut • Text • Namespace • Befehlsverarbeitung • Kommentar • Dokument Knoten

  4. - Path-Angaben sind relativ oder absolut sein: - Jede Ebene wird durch einen „/“ dargestellt Ein absoluter Pfad beginnt mit einem „/“ Beispiel: /bookstore/book -Ein relativer Pfad beginnt ohne „/“ Beispiel: book/title

  5. Beispiel: <bookstore><book> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price>  </book></bookstore>

  6. Allgemeine Ausdrücke:

  7. Ausdrücke anhand unseres Beispiels:

  8. Weitere wichtige Abfragen: Weiter Operatoren: http://www.w3schools.com/xpath/xpath_operators.asp

  9. Alle wichtigen Befehle findet ihr unter: http://www.w3schools.com/xpath/xpath_syntax.asp Für weitere Fragen lohnt sich das Tutorial: http://www.w3schools.com/xpath/

  10. …und jetzt ran an die Aufgaben! -> Konsole mit Desktop-Verknüpfung oder im Installations-Ordner “bin” mit “startup.bat” starten -> eigene eXist-Homepage aufrufen: http://localhost:8080/exist/index.xml -> links auf „XQuery IDE (eXide)“ -> Abfrage eingeben und auf „Run“ klicken

  11. Danke für eure Aufmerksamkeit!

More Related