javascript - Rendering XML in a new window in Chrome -
i have used following code displaying xmlstring
retrieved ajax call in new window:
window.open('data:text/xml,' + encodeuricomponent( xmlstring ) );
it working in firefox need make work in chrome well. can not have specific xslt file transformation, because xmlstring
have dynamic structure, different each time call controller. xml string want show in new window. can advise?
update: error in chrome:
this page contains following errors:
error on line 1 @ column 65425: couldn't find end of start tag loca below rendering of page first error.
and see messedup string not xml.
i not know if related xml structure found link says above code working in firefox or opera. again cannot use xslt not know do.
render xml document (obtained through ajax call) new window
thank helping me! ;)
if type following console in chrome,
window.open('data:text/xml,' + encodeuricomponent( "<a><b><c/><d/></b><e/></a>") );
and click on pop-up icon allow blocked window,
then see tab graphical rendition of xml,
as expected.
update
if page contains following error,
error on line 1 @ column 65425: couldn't find end of start tag loca below rendering of page first error.
then xml not well-formed. try well-formed example xml show above. when find works expected, , when consider error message you're receiving, you'll see problem not xml rendering problem rather xml syntax problem in data itself.
Comments
Post a Comment