<HTMLInputElement>this.content.getElementsByTagName('body')[0].getElementsByTagName('par')[0]).children
const parsedContent = new DOMParser().parseFromString(this.smilContent, "text/xml");
In WEINRE:
I'm not sure wether this is the same DOM, or that WEINRE/Google Chrome is doing something completely different with it?
Could it be that WEINRE has some limitations in displaying certain limitations like diplaying <HTMLInputElement>?
I'm trying to parse a string to a XML document. In both my signage device and my dev pc I run the same code
const parsedContent = new DOMParser().parseFromString(this.smilContent, "text/xml");
But the outcome doesn't look a like that much:
...
I'm not sure wether this is the same DOM, or that WEINRE/Google Chrome is doing something completely different with it?
const tags = (<HTMLInputElement>this.content.getElementsByTagName('body')[0].getElementsByTagName('par')[0]).children;
for (let i = 0; i < tags.length; i++) {
const tags = (<HTMLInputElement>this.content.getElementsByTagName('body');
for (let i = 0; i < tags.length; i++) {
<?xml version="1.0" encoding="iso-8859-1"?>
<smil screenshot="false">
<playlist id="24479" template="62-00000000000000" from_date="2018-01-26" to_date="2028-01-26" from_time="00:00:00"
to_time="23:59:00" weekdays="1,2,3,4,5,6,7" priority="">
<head>
<layout>
<root-layout xml:id="display:0" width="1920" height="1080" backgroundColor="#000000"/>
</layout>
</head>
<body>
<par>
<img src="filename.jpg" begin="0ms" fit="meet"
dur="150750ms" md5="7297ee6d86053c06ebb81194dcb604ff" region="Background318" size="414707"
content_id="27618"/>
Hope you have any clue of what is going wrong :-)