Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Cannot open *.xml file

2. Help
Gundheim
2010-01-18
2012-12-05
  • Gundheim
    Gundheim
    2010-01-18

    I am having difficulty opening an xml file. I created the file using NP++, but when I reopened the project, the file was not included. When I browse to the folder it is in, NP++ will not open the file. I am running Windows Vista HP and have not made any updates recently either to the OS or to NP++ (current version is 5.5.1).

     
  • cchris
    cchris
    2010-01-18

    How do you attempt to open the file? Double clicking on it? Dragging it into or onto N++? Using the shell context menu?

    What happens then? Error message, just nothing, or something weirder?

    I can only recommend you to update to 5.6.4 - it may help if the problem stems from the right click openng attempt.

    CChris

     
  • Gundheim
    Gundheim
    2010-01-18

    Double clicking, dragging, context menu, and NP++ "open file" menu choice all result in the same thing: It just doesn't open. There is no error message, but nothing wierd like the program or the system crashing.

    I will try updating NP++ and see what happens with that.

     
  • Gundheim
    Gundheim
    2010-01-18

    Updating did not fix this. I still am unable to open xml files.

     
  • cchris
    cchris
    2010-01-18

    Can you open xml files using a different editor? Are there property values of the file that look suspicious to you (hidden, system, security …)?

    CChris

     
  • Gundheim
    Gundheim
    2010-01-18

    Yes, I can open them using different editors. Anything from notepad to TextPad, but not NP++. The strange thing is that I created this particular document in NP++. And, as I said earlier, after I closed the project and then reopened it, the xml document was not in the project anymore. Other than that, there is nothing unusual about the document contents or it's properties.

     
  • Gundheim
    Gundheim
    2010-01-18

    So, the solution to this is easy, but silly. I had the default session file extension set to .xml. I went in and changed that to .session, and now I can open .xml files. Seems peculiar to me, but this must be a feature, and not a bug.  =)

    Thanks for your help CChris.

     
  • Don HO
    Don HO
    2010-01-18

    Make sure the extension .xml is not used for Session file extension.

    Don

     
  • MrP
    MrP
    2010-02-25

    I have the same problem. Notepad++ Version 5.6.6

    File > Open. Select a file ending in ".xml" and attempt to open it and literally nothing happens.

    In Windows Explorer, right mouse-context menu, select "Edit with Notepad++". It switches to Notepad++, but nothing is loaded.

    The XML file is valid and opens OK in other programs, including Internet Explorer.

    If I change the file extension to ".txt" it opens in Notepad++ OK.

    I have just installed the XML Tools plugin and still Notepad++ does not open ".xml" files. (It didn't work before and it doesn't work after.)

    Any ideas?!

     
  • MrP
    MrP
    2010-02-25

    I had the default session file extension set to .xml. I went in and changed that to .session, and now I can open .xml files.

    Ah, that's it!! Thanks!

    (Sorry, I just noticed the other posts in this thread, which weren't visible when I first searched!? *sigh*)

     
  • Yu Jin
    Yu Jin
    2012-11-05

    I have version 6.1.4 on Win7 and still the same problem. Only if I change the file name extension of the session file in preferences to something different from xml, Notepad++ is able to open xml files.

    Almost three years have passed since this thread was opened. Have none of develepers noticed this bug yet?

     
  • Gundheim
    Gundheim
    2012-11-05

    format-c, that is the conclusion I reached some time ago. Apparently, the devs do not look at these forums often, or they figured that since I had posted my "fix", they did not need to address it anymore. ** shrug ** It could also be that they don't consider this a bug since it keeps folks who are not too curious from directly editing the session files. And those of us who are too curious will probably figure out what we did and how to fix it.  = )

     
  • I for one read these forums - I probably wouldn't class myself as a "dev" though, just an occasional patcher.  I know Don does read what he can, but probably not everything.

    Personally, I must say, I don't really class this as a bug, just a missing error message.  If you register ".xml" as your session file extension, then load an xml file, it should say "hey, that's doesn't look like a session file", not fail silently.  But not opening the XML is actually the right thing to do.  You wouldn't expect winamp to try to play a playlist file as an MP3 just because it didn't think it looked like a playlist file.  However, you also would expect a message along the lines of "This playlist file just doesn't look like a playlist file", which is the sort of thing N++ should say (IMHO) if it can't open the session file. 

    Most people (and the default, I believe), have it set to ".nppsession". 

    You could also suggest (in ideatorrent from the hosted apps menu) that opening a file and opening a session are two different operations, and should be split both on the menu and on the command line.  Either you want to open the mysession.nppsession because you want to edit it by hand, or you want to open as a session.  Having a single command perform two functions is possibly more confusing than two separate commands.

    Just my 2 cents.
    Dave.