Opening xml files in palemoon

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Opening xml files in palemoon

Unread post by thosrtanner » 2017-06-02, 08:37

I have an (admittedly rather largish) xml file that I tried to open in palemoon (and firefox) and it complains there's an error in the file. It is possibly triggered by this sequence

<playLists xmlns="http://www.mozilla.org/keymaster/gateke ... s.only.xul">

as the character position stated in the error is just at the end of that.

I've tried the same file in internet explorer, microsoft edge and on several validators and they can find nothing wrong with it.

Is there something wrong with that, or is Palemoon treating it specially?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35576
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Opening xml files in palemoon

Unread post by Moonchild » 2017-06-09, 14:18

Most likely: You're defining the name space as XUL, so Pale Moon will expect XUL compatible XML code. <playList> is not a valid XUL tag.

More info would be helpful (e.g. the file in question, and why you're trying to define it as XUL...)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Opening xml files in palemoon

Unread post by thosrtanner » 2017-06-09, 20:41

I have no idea why it's being defined as xul. It's an export of the xml configuration of the inforss extension, and I'm not altogether sure why some values are set the way they are... I take it that that xmlns bit is not a very good idea?

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Opening xml files in palemoon

Unread post by adesh » 2017-06-10, 05:21

thosrtanner wrote:I have no idea why it's being defined as xul. It's an export of the xml configuration of the inforss extension, and I'm not altogether sure why some values are set the way they are... I take it that that xmlns bit is not a very good idea?
XUL is used to define UI for extensions for Firefox-like browsers including Pale Moon. Namespace (xmlns bit) tells what all tags you can use in your XML file. Since XUL has a special meaning for Firefox / Pale Moon, they are treating it specially and resulting in error. Internet Explorer knows absolutely nothing about XUL and hence it displays it as it is.

Problems aside, may I know what benefint are you expecting by opening it in a browser. You can't do much with XML files in a browser anyway, so it just might be better to open it in your favourite text editor.

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Opening xml files in palemoon

Unread post by thosrtanner » 2017-06-10, 13:56

adesh wrote:Problems aside, may I know what benefint are you expecting by opening it in a browser. You can't do much with XML files in a browser anyway, so it just might be better to open it in your favourite text editor.
Because the browser indents and line breaks, so the xml is more or less readable. My editor gives you what it is given which is a 32,000+ character line.

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Opening xml files in palemoon

Unread post by thosrtanner » 2017-06-10, 16:45

Hmm. It appears that document.createElement is putting in the namespace, and then when the xml is being serialised it's being output. But I'm not sure how it's getting the namespace in there right now.

Addendum: Fixed the element creation

Locked