Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4712] Android: Empty XML Document should throw exception

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-07-27T10:27:36.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sSprint 2011-30, Release 1.8.0
ComponentsAndroid
Labelsparity
ReporterDon Thorp
AssigneeBill Dawson
Created2011-07-19T09:06:11.000+0000
Updated2011-08-26T15:05:33.000+0000

Description

Exposed from xml drillbit test (xml.js, documentParsing test).
// Parse empty document - spec specifies that a valid XML doc
// must have a root element (empty string doesn't)
valueOf(function() {
   Ti.XML.parseString('');
}).shouldThrowException();

Comments

  1. Bill Dawson 2011-07-26

    Additional test code. You should expect an exception to be caught and displayed here:
       //Ti.Network // Workaround for TIMOB-3465
       try
       {
           var doc = Ti.XML.parseString('');
       }
       catch(e)
       {
           alert(e);
       }
       
  2. Bill Dawson 2011-07-26

    Pull request ready: https://github.com/appcelerator/titanium_mobile/pull/290
  3. Don Thorp 2011-07-27

    Code review, testing, handling additional JIRA issues.
  4. Natalie Huynh 2011-08-26

    Tested drillbit xml with: version=1.8.0 timestamp=08/26/11 14:21 githash=0e2031e Android Emulator 2.1 and 3.2

JSON Source