Why does my app not like XML Notepad?
August 7, 2007 11:43 AM   Subscribe

I'm currently using XML Spy to edit XML templates. I've just checked out MS XML Notepad and much prefer it, but the app I'm using which references the XML doc doesn't like it. Why?

I'm using XML templates in my workflow - I edit some of the nodes and then I activate an app. I can't say which one - sorry - but lets say it's one which creates a CD, and I edit the tracks in the XML template, hit build, and a CD is created with those tracks. Currently I'm using Altova XML Spy to do this, but I've just been turned on to MS XML Notepad which I much prefer - its tree view makes navigation much easier (the doc's pretty long), and I like the basic interface - XML Spy is a bit overkill for what I need. However, if I open my XML doc (created in XML Spy) in XML Notepad, my app won't build it (Error - Cannot Read Script Correctly). Am I doing something daft? (I'm no XML pro btw)
posted by forallmankind to Computers & Internet (8 answers total)
Can you post the XML here?
posted by yerfatma at 12:40 PM on August 7, 2007

Is there a debug mode in your build process that can return error messages longer than five words?
posted by rhizome at 1:00 PM on August 7, 2007

Sounds like Notepad is 1) putting in some unwanted tags (possibly carets to denote where the cursor was last, similar to Epic with which I also work) or 2) putting in some unwanted whitespace the parser doesnt understand. If you want, send the XML to me and I'll be happy to check it out for you at work tomorrow. I have Spy and can download Notepad. I'm UK-based so you probably won't get your answer immediately depending on where you are.

Alternatively, use windiff or another comparison app to work out if the Spy output is the same as the output from Notepad and then amend the notepad output so that it parses.
posted by urbanwhaleshark at 1:51 PM on August 7, 2007

urbanwhaleshark - thanks for the very generous offer. Unfortunately the nature of the work I do is somewhat classified so I'm unable to release any documents.

Your answer has however given me the idea of contacting the supplier of the app to see if there's particular editors I can or cannot use.
posted by forallmankind at 2:22 PM on August 7, 2007

You might try opening the file in normal Notepad (or any other plain text editor) to see if there are any non-XML friendly characters in there. High ASCII, ampersands, apostrophes, etc.
posted by yerfatma at 2:30 PM on August 7, 2007

ah! If I open a saved XML Spy doc in Notepad, when I go to save it, the default encoding option is ANSI. If however I open a saved XML Notepad doc in Notepad, when I go to save it the default encoding option is UTF-8. If I switch the encoding option to ANSI and save as XML, then the document will build in my app.

Also, XML Notepad is adding a line to the head of the doc which says < ?xml version="1.0" encoding="utf-8" ?>.

However, if I change this to "ansi", it still doesn't work.

I don't know what these encoding options mean but will it be possible to change the default encoding of XML Notepad to ANSI?

(Please note - the app I'm using is very specialized, that's why it's not adhering to what I believe are standard XML rules like declaring the version # at the head of the file).
posted by forallmankind at 3:24 PM on August 7, 2007

Update: I emailed Chris Lovett, the author of XML Notepad, and he said the only way to currently change the encoding is to change the encoding declaration.
posted by forallmankind at 5:05 PM on August 7, 2007

Assuming you're using XP or 2K, take the output from XML notepad and load it into Windows Notepad. Then Save As ANSI.
posted by urbanwhaleshark at 11:57 AM on August 8, 2007

« Older Replace HVAC now or later?   |   Flash Video Homepage Newer »
This thread is closed to new comments.