Re: [xmljs-users] Atom Feeds and Encoding
Brought to you by:
djoham,
witchhunter
From: David J. <dj...@ya...> - 2005-08-29 03:44:17
|
Hi Brent, namespace: something is horked here, but I don't know what it is yet. For the time being, you can probably get past this by turning namespace support off. It doesn't look like atom feeds really use namespaces all that much, so I doubt that will impact your code at all. To turn namespace support off, you set the namespaceAware property of the DOMImplementation node to false - like this: var parser = new DOMImplementation(); parser.namespaceAware = false; That got me past the exception and I was able to parse the XML properly... encoding: XML for script shouldn't have a problem here. I did a check on the rss feed and the server isn't specifying an encoding. Is it possible that Konfabulator is goofing up the string before xmljs gets it? When I load the XML from that data source, Konqueror loses the accents also. However, Firefox does not. Just to make sure xmljs was OK, I stripped the XML from that source down to the bare minimum that had the accented characters. I then fed that XML into xmljs in Firefox and looked at the DOM tree. The accents were still there. At this point, I'm not sure what really to do about the encoding issue. I do have a battered G3 Powerbook that I can use for further debugging, but I've never used Konfabulator and don't really have a lot of time to learn it. Do you have any suggestions? Please let me know if the namespaceAware property gets you going. I'll try to look at the exception in the next couple of days and see if I can get you a real fix... Best regards, David --- Brent Johnson <blj...@gm...> wrote: > > > 1) I can't get it to parse Atom feeds. It just keeps returning a > > > NAMESPACE_ERR. Anyone run into this and know how I can fix this, or a > > > way to get around it? > > > > I've never tried an Atom feed. Can you post as small an example as possible so we can take a > look > > at it? > > The example the user sent to me (I'm using xmljs for a Konfabulator > widget) was a blog entry on blogspot.com: > > http://trishtunney.blogspot.com/atom.xml > > > > 2) Encoding! I'm trying to pull an RSS feed thats in french and the > > > accented characters just keep coming back as garbled when I get the > > > node value of the text node containing the french text. > > > > > Make sure the page's locale header specifies the proper encoding. Otherwise, the browser has > to > > guess what it should be and may very well guess wrong. Otherwise, it should work... > > Hmm, here's the example RSS feed that has french characters: > http://www.lapresseaffaires.com/rss/lpa.xml > > Thanks, > > - Brent > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |