Javascript / XML
Peter Kelly
pmk at kde.org
Fri Jun 20 03:56:46 BST 2003
On Thu, 19 Jun 2003, David Joham wrote:
>
> Hi all...
>
> A while back, I had a conversation with Peter Kelly about this topic. He mentioned that he was
> looking into adding .load() support for Konq 3.2, but he didn't fully commit to doing it. Peter,
> if you're listening, do you have a status report?
It's on my TODO list (along with many other things). Time is my main issue
at the moment :(
It's unlikely that it will be in 3.2, but hopefully at some stage I will
get to it.
>
> <selfless_plug>
> Shawn, you might also be interested in a little pet project of mine called XML for <SCRIPT> which
> provides a DOM and a SAX parser for browsers in JavaScript. Works with Konq, Moz, IE and Opera.
> You can find more info at http://xmljs.sf.net
> </selfless_plug>
>
> Best regards,
>
> David
>
> --- "Shawn P. Garbett" <listman at garbett.org> wrote:
> > On Thursday 19 June 2003 02:26 pm, Shawn P. Garbett wrote:
> > > On Thursday 19 June 2003 2:14 pm, Alex Russell wrote:
> > > >On Thursday 19 June 2003 1:58 pm, Shawn P. Garbett wrote:
> > > >> What level of XML support is in Javascript?
> > > >
> > > >...
> > > >Konqueror has pretty good DOM support for (X)HTML documents, although
> > > >I can't speak to how well konq supports XML with arbitrary DTDs.
> > >
> > > Well my experience so far is that it doesn't, at all. The load method just
> > > throws and exception the moment I try to load an XML document.
> >
> > I decided to see if I could get javascript to load a valid HTML or XHTML with
> > the same code. It throws an exception and exits, so even this is causing me
> > grief.
> >
> > Is document.load a standard function? If not, how do I load a document in
> > "standard" javascript?
> >
> > <html><head><title>crash.html</title></head>
> > <body>
> > <script type="text/javascript">
> > function loadHTML(url)
> > {
> > alert("loadHTML("+url+")");
> >
> > try
> > {
> > // Use the standard DOM Level 2 technique, if it is supported
> > if (document.implementation && document.implementation.createDocument)
> > {
> > // Create a new Document object
> > var xmldoc = document.implementation.createDocument("", "", null);
> > xmldoc.load(url);
> > alert("Made the load");
> > }
> > }
> > catch(ex)
> > {
> > alert ("CAUGHT EXCEPTION!");
> > }
> > }
> >
> > loadXML(location.href);
> >
> > </script> </body> </html>
> >
> >
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
--
Peter Kelly
pmk at kde.org
More information about the kfm-devel
mailing list