We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
LoadURLWithLineNumbers
1 parent 4558cdd commit 86aa304Copy full SHA for 86aa304
parse.go
@@ -765,17 +765,3 @@ func (p *lineNumberAnnotator) findProcessingInstructionPosition(target string) i
765
}
766
return 1
767
768
-
769
-// LoadURLWithLineNumbers loads the XML document from the specified URL with line number annotations.
770
-func LoadURLWithLineNumbers(url string) (*Node, error) {
771
- resp, err := http.Get(url)
772
- if err != nil {
773
- return nil, err
774
- }
775
- defer resp.Body.Close()
776
777
- if xmlMIMERegex.MatchString(resp.Header.Get("Content-Type")) {
778
- return ParseWithOptions(resp.Body, ParserOptions{WithLineNumbers: true})
779
780
- return nil, fmt.Errorf("invalid XML document(%s)", resp.Header.Get("Content-Type"))
781
-}
0 commit comments