Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xpath root node question #1550

Closed
matianhe3 opened this issue Mar 15, 2021 · 1 comment
Closed

xpath root node question #1550

matianhe3 opened this issue Mar 15, 2021 · 1 comment

Comments

@matianhe3
Copy link

    file = readxml("f0dc19ff.xml")
    nums = findall("//TT", file)
    for num in nums
        counter = findall("//contour", num))
        println(length(counter))
<TT><contour></contour></TT>
<TT><contour></contour></TT>
<TT><contour></contour></TT>
<TT><contour></contour></TT>
<TT><contour></contour></TT>
<TT><contour></contour></TT>

i think it will print 1 , i want get every => num.
but it gives me 6, findall seems not in num , it still search in file?
i must use counter = findall("//contour", parsexml(string(num))) get the result that i need.

@fredrikekre
Copy link
Member

Wrong repository? I don't see how this relates to Documenter, so will close. If this is some kind of general Julia question you should use the forum: https://discourse.julialang.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants