default namespace replaced with regex

This commit is contained in:
Vladimir Enchev
2015-04-29 10:58:16 +03:00
parent fd21c03acc
commit c192aba30e
2 changed files with 32 additions and 1 deletions

View File

@ -154,7 +154,10 @@ function parseInternal(value: string, exports: any): componentBuilder.ComponentM
throw new Error("XML parse error: " + e.message);
}, true);
xmlParser.parse(value.replace('xmlns="http://www.nativescript.org/tns.xsd"', "").replace("xmlns='http://www.nativescript.org/tns.xsd'", ""));
if (types.isString(value)) {
value = value.replace(/xmlns=("|')http:\/\/www.nativescript.org\/tns.xsd\1/, "");
xmlParser.parse(value);
}
return rootComponentModule;
}