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

Ignore error "Specification mandates" #159

Closed
Lightjohn opened this issue Mar 20, 2021 · 1 comment
Closed

Ignore error "Specification mandates" #159

Lightjohn opened this issue Mar 20, 2021 · 1 comment

Comments

@Lightjohn
Copy link

Hi,

Discovering Julia and trying to get and parse Julia doc for fun:

using HTTP, EzXML

url = "https://docs.julialang.org/en/v1/NEWS/"

r = HTTP.get(url, status_exception=false)
if r.status != 200
    println("Oups failed to get")
else
    println("Request ",  r.status)
    doc = parsexml(String(s))
    data = findall("//a[@class=\"docs-heading-anchor\"]", doc)
    println(data)
end

I get this error for this site but also others:

ERROR: LoadError: XMLError: Specification mandates value for attribute href from XML parser (code: 41, line: 46)

It seems to be Errors in the code, would it be possible to ignore this error and still parse the doc.

I did not find any info on how to manage these errors with EzXml

@Lightjohn
Copy link
Author

Sorry error was parsexml should have used parsehtml

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

1 participant