Basic answer, yes.  If you copied and pasted the example html, then
the url parameter references "labels.xml", which would have to reside
in the same directory as where you saved the html file. Also, don't
forget that you also need the jquery file it references as well.

So to more succinctly answer you question.  You will need to have
three files in your local directory.
1) The html file.
2) The jquery file (named jquery.js in that example)
3) The xml file (named labels.xml)

That should solve your problem.

On Jun 2, 6:07 am, fredriley <fred.ri...@gmail.com> wrote:
> Ok, perhaps that's a provocative subject line, but it is my basic
> question. I'm testing jQuery's capacity for parsing XML files, and
> have immediately hit the error:
>
> Access to restricted URI denied" code: "1012
>
> This came simply from replicating the example 
> athttp://www.xml.com/pub/a/2007/10/10/jquery-and-xml.htmland running it
> locally via File|Open (no server). If I run the code on Apache 
> (http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jquery_xml1.html) it
> works fine.
>
> A search for the error string shows that it's common and is caused by
> a "cross-domain" XML request (strange as it's running locally), and a
> couple of discussions suggest using JSON instead. Now, I'm not going
> to recast my XML docs as JSON, so before I go any further I would like
> to know if jQuery can be used to parse XML files on local disk? It has
> to be local disk as this is for a desktop application which won't rely
> on a live connection. If not, no bother, I'll use something else,
> maybe Flash or Flex; if so, I'd appreciate tips as to how to get past
> this fatal error.
>
> Nothing's ever easy in the Javascript world... ;(
>
> Cheers
>
> Fred
>
> PS: Is there a way of getting notification of replies to a thread on
> this group, anyone know?

Reply via email to