As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<?xml version="1.0" encoding="UTF-8"?> <tns:ProductApplication xmlns:alf="http://www.alfresco.org" xmlns:chiba="http://chiba.sourceforge.net/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:null="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/ProductApplication" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tns:application>Some Application</tns:application> <tns:product><p>Some Product</p></tns:product> <tns:crossSellRank>1</tns:crossSellRank> </tns:ProductApplication>
E4X doesn't support parsing XML declaration ( <?xml version=…?>) (see bug 336551 ). You may get SyntaxError "xml is a reserved identifier" (despite the XML being in a string).Workaround:var response = xmlhttprequest.responseText; // bug 270553 response = response.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug 336551 var e4x = new XML(response);
var response = xmlhttprequest.responseText; // bug 270553 response = response.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug 336551 var e4x = new XML(response);
var content = new XML(node.content.replaceAll("(?s)<\\?xml .*?\\?>\\s*", "")); // Workaround: Mozilla Bug 336551
<nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00"> <NFe xmlns="http://www.portalfiscal.inf.br/nfe">