Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5726] Ti.XML.DOMImplementation.createDocument undefined object

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2018-05-06T00:29:06.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterTony Lau
AssigneeShak Hossain
Created2018-05-05T23:25:22.000+0000
Updated2018-05-06T19:12:53.000+0000

Description

In index.js, I have var myTestXML = Ti.XML.DOMImplementation.createDocument(null,'TESTXML',null); I keep getting 'undefined is not an object (evaluating Ti.XML.DOMImplementation.createDocument)' error I tried the followings too and yield the same results: Ti.XML.DOMImplementation.createDocument('test.xml','TESTXML',null); Ti.XML.DOMImplementation.createDocument(Ti.Filesystem.applicationDataDictionary + 'test.xml','TESTXML',null);

Comments

  1. Hans Knöchel 2018-05-06

    You should call method on object instances, e.g. domImplementation.createDocument(args). You receive an instance by using the Ti.XML API's (implementation property) on a Ti.XML.Document instance. Read more [here](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.XML.Document-property-implementation).

JSON Source