Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1802819.gFTYypYLGV@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 03 Sep 2012 21:45:37 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 54 NNTP-Posting-Date: 03 Sep 2012 21:45:39 CEST NNTP-Posting-Host: d2433067.newsspool3.arcor-online.net X-Trace: DXC=?[;>UT`Q_KcEB;5>eE0T7mMcF=Q^Z^V3h4Fo<]lROoRa8kF On 2012-09-01 00:56, Gene Wirchenko wrote: >> I will be passing back long result strings to my Web pages. These >> strings have to be parsed into error codes and form field contents. >> What I am working with looks like >> ::\n >> The value is encodeURIComponent()ed. > > From your other posts, it appears that you're in control of both backend > and client code. If that's the case, you may want to consider one of the > many standardized data transfer formats. > JSON would be the obvious choice, as it's trivially easy to use for a > JavaScript client, and it's well supported in every major server-side > language. Others possible choices include XML (also well supported by > JS) […] In contrast to built-in JSON support from ECMAScript (ECMA-262) Edition 5 forward [0], ECMAScript and its conforming implementations have no native support for XML. However, many more recent host environments provide features to support XML with ECMAScript binding that are standardized or in the standardization process, thus host objects such as DOMParser [1] and XMLSerializer [2], and of course XMLHttpRequest (which has a responseXML property to implement refer to an object implementing the Document interface if the Content-Type fits) [3]. There have been implementations of ECMAScript for XML (E4X, ECMA-357) in Mozilla, thus Mozilla-based browsers, but development of that and support of E4X has been discontinued there, unfortunately. Firefox 10 and later do not support E4X syntax and objects in ES5 strict mode. E4X support will likely be disabled by default per Firefox 17. [4] E4X support today can still be found in the older Rhino 1.7 implementation, for example. The ECMAScript Support Matrix [5] already contains one test case for the for-each statement of E4X. As time permits, there are going to be more E4X-related test cases there. PointedEars ___________ [0] [1] [2] [3] [4] pp. [5] -- var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) // Plone, register_function.js:16