<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi --<div><br></div><div>It would be nice to have a streamlined support for loading XML documents from URLs. I think that WebClient would be the way to go for HTTP downloads:</div><div><span style="font-size: 13.3333px">(WebClient httpGet: 'https://w1.weather.gov/xml/current_obs/index.xml') contentStream</span><br></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">"XML-Parser" currently depends on "Files" because of SAXHandler class >> #parserOnFileNamed:. A dependency on "WebClient" might not hurt ... maybe through the "Tools" package? Hmmm...</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Well, I don't like the class-side interface of SAXHandler and XMLDOMParser. Instead, I prefer the reader/writer notion like this:</span></div><div><span style="font-size: 13.3333px"><br></span></div><div>XMLDOMParser onFileNamed: '...'</div><div>XMLDOMParser onURL: '...'<br></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Considering the actual result, I like the interface of Form (for PNGs, JPEGs, etc.):</span></div><div><span style="font-size: 13.3333px"><br></span></div><div>XMLDocument fromFileNamed: '...'</div><div><span style="font-size: 13.3333px">XMLDocument fromURL: '...'</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Please find attached a change set that makes the proposed interface work in Squeak Trunk.</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Best,</span></div><div><span style="font-size: 13.3333px">Marcel</span></div><div><span style="font-size: 13.3333px"><br></span></div><div class="mb_sig"></div>
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 22.09.2021 22:30:08 schrieb gettimothy via Squeak-dev <squeak-dev@lists.squeakfoundation.org>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10pt"><div>Hi Folks,<br></div><div><br></div><div>No biggie, just interesting...<br></div><div><br></div><div><br></div><div><blockquote style="border: 1px solid rgb(204, 204, 204);padding: 7px;background-color: rgb(245, 245, 245);min-width: 500px"><div>    |tree url |<br></div><div>    url := '<a target="_blank" href="https://w1.weather.gov/xml/current_obs/index.xml">https://w1.weather.gov/xml/current_obs/index.xml</a>'.<br></div><div>    tree := (XMLDOMParser on:  (HTTPLoader default retrieveContentsFor: url) contents<br></div><div>    ) parseDocument.<br></div><div>    tree explore.<br></div><div><br></div><div>(XMLDOMParser onURL: '<a target="_blank" href="https://w1.weather.gov/xml/current_obs/index.xml">https://w1.weather.gov/xml/current_obs/index.xml</a>') parseDocument; explore.  "throws an error"<br></div></blockquote><br></div><div><br></div><div>The first form works on squeak.<br></div><div>The latter form works on pharo.<br></div><div>The latter does NOT Squeak because the XMLHTTPException: Forbidden (403) error gets thrown.<br></div><div><br></div><div>It is interesting that a platform difference would cause that error.<br></div><div><br></div><div>No biggie, but I would like to include a common retrieval method for both platforms in the XPathHelp (May turn it into a book down the road,too)<br></div><div><br></div><div>cheers.</div></div><br></div></blockquote></div>