Skip to content

XPath support #30

@tecosaur

Description

@tecosaur

While XML.jl does a great job just with parsing/writing XML documents, it would be great if it provided a few facilities to help work with them too.

One that would be really nice to see is XPath support. I've implemented a simple subset of XPath as a macro in a package of mine:

https://code.tecosaur.net/tec/RestClient.jl/src/branch/main/ext/XMLExt.jl#L102

It works by producing an XPath-getting function from the macro, e.g.

julia> @macroexpand @xpath "some/xpath/@attr"
node -> extract_attr(extract_child(extract_child(node, "some"), "xpath"), "attr")

Perhaps that could be a useful starting point or at least of interest?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions