Skip to content
FutureBlitz

    Install

    Import std.data.xml_path

    XmlPath

    std.data.xml_path

    class

    Public Class XmlPath

    XPath 1.0's location paths, a subset of them, which select nodes of an XmlNode's tree.

    Examples

    Local root = Try Xml.Read("<a><b>1</b><c><b>2</b></c></a>")
    Local everywhere = XmlPath("//b")
    Expect(everywhere.Query(root).Count == 2)
    Expect(XmlPath("c/b").Query(root)[0].Text == "2")

    std/data/xml_path.fb, line 31

    • @PanicsAtCaller Public New(text: String) constructor #

      The path text writes. Panics when it isn't one XmlPath reads.

    • Public Method Query(node: XmlNode): XmlNode[] method #

      The nodes the path selects from node, in the document's order, each once. An attribute is a node of its own, an ATTRIBUTE, made for what selects it.

    • Public Method ToString(): String method #

      The path, as it was written.

    Report an issue with this page or with FutureBlitz on GitHub.