~holger-seelig/x-ite/trunk-1

« back to all changes in this revision

Viewing changes to src/x_ite/Parser/XMLParser.js

  • Committer: Holger Seelig
  • Date: 2018-11-16 05:41:16 UTC
  • Revision ID: holger.seelig@yahoo.de-20181116054116-doa3zcmq6y0gf1e0
Fixed XMLParser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
991
991
         */
992
992
 
993
993
        var
994
 
                trimWhitespaces = /^[\x20\n,\t\r\"]+|[\x20\n,\t\r\"]+$/g,
995
 
                whitespaces     = /[\x20\n,\t\r\"]+/;
 
994
                infs            = /\binf\b/g,
 
995
                nans            = /\bnan\b/g,
 
996
                trimWhitespaces = /^[\x20\n,\t\r"]+|[\x20\n,\t\r"]+$/g,
 
997
                whitespaces     = /[\x20\n,\t\r"]+/;
996
998
 
997
999
   function prepareBool (string)
998
1000
        {
1002
1004
   function prepareFloat (string)
1003
1005
        {
1004
1006
                return (string
1005
 
                        .replace (/\binf\b/g, "Infinity")
1006
 
                        .replace (/\bnan\b/g, "NaN")
 
1007
                        .replace (infs, "Infinity")
 
1008
                        .replace (nans, "NaN")
1007
1009
                        .replace (trimWhitespaces, "")
1008
1010
                        .split (whitespaces));
1009
1011
        }