Problem when opening a xml file

Nosmas

New member
Local time
4:04 AM
Messages
46
Location
Chipstead, Surrey, UK
I have a small program, which uses a number of xml files. The program is not working properly and I suspect that is due to a problem with one of the xml files. When I click on any except one of those files it opens in a MS Edge (the default Windows 10 browser) window and all the elements, sub-elements, data and closing tags can be seen and read. Clicking on the problem file opens it in Edge BUT only shows the Root element, followed by the first element (called Appointment) then a large (vertical) space then another Appointment first element. There are (correctly) 25 of these Appointment elements and NO closing tags for them OR the Root element. However, clicking on ANY of the first Appointment elements immediately causes all the missing lines to be displayed – i.e. various other elements and their data and closing tags and also the closing tag for the Root element.

The file thus displayed is a perfectly normal xml file and it seems that there is something (possibly damage/corruption) that is prohibiting it from opening properly in the first place. Opening the xml file in Excel 2016 then saving as another name has no effect on its behaviour. Any thoughts please as to the cause and way to correct.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell Optiplex 9030
OS
Microsoft Windows 10 Pro 64-bit Multiprocessor
CPU
Intel(R) Core(TM) i3-4160 CPU @3.60 GHz x 4
Memory
4.00 GB
Monitor(s) Displays
23-inch full-HD WLED
Screen Resolution
1920 x 1080 @ 60 Hz
Hard Drives
1 x 2.5-inch SATA hard drive
PSU
185 Watt
Browser
MS Edge and IE 11
Open the file in Wordpad, and edit it as needed.

When you save the file, make sure you save it as an Office Open XML Document.

Now go into File Manager and find the document. Unhide the extension. It will have the following extension: ".xml.doc". Remove the ".doc" part from the extension, so that it has only ".xml" as an extension.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Linux Mint 18.2 xfce 64-bit (VMWare host) / Windows 8.1 Pro 32-bit (VMWare guest)
CPU
Haswell
Memory
4 GB
Monitor(s) Displays
Acer 23"
Screen Resolution
1920 x 1080
Hard Drives
Two hard drives, 1TB each: One for Linux, one for my data.
Keyboard
IBM Model M
Antivirus
Sophos (Linux), Trend Micro (Windows)
Browser
Firefox, Opera
Other Info
I use Samba to share my data drive with the other computers at my house and with my guest session in VMWare Workstation Player.
A better solution would be to open it in Notepad++. It should open properly, unless it is corrupted, and you can save it in the same format that it loads in, which is probably native XML.

I use Notepad++ exclusively for editing XML and other languages, such as HTML, etc. It's extremely flexible, and free.

Did I mention free? :)

You can get it here:

Notepad++ Home
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Mellon Labs (custom build)
OS
Win 7 Pro x64/Win 10 Pro x64 dual boot
CPU
AMD FX 8350 Vishera @ 4200
Motherboard
ASUS M5A97 R2.0
Memory
16 GB Mushkin Blackline DDR3-2400 @ 1866 (9-10-10-10-31)
Graphics Card(s)
XFX Radeon R9 280 Double D Black Edition
Sound Card
Realtek HD Audio on MB. Sounds great.
Monitor(s) Displays
Acer 24", Acer 22"
Screen Resolution
3840 x 1080
Hard Drives
1 x Mushkin Chronos 120 GB SSD (Win 10)
1 x Samsung 850 EVO 250 GB SSD (Win 7)
1 x WD 1TB SATA Blue
1 x WD 1TB SATA Green
PSU
Corsair TX-750
Case
CoolerMaster HAF 912+
Cooling
Coolermaster Seidon 240M Liquid AIO. 6 case fans
Keyboard
Logitech G710+
Mouse
Logitech G500s
Internet Speed
Much better since I got fiber, but still way overpriced.
Antivirus
MSE, Malware Bytes for scanning
Browser
Firefox
Other Info
Corsair VOID USB headphones.

A Mellon Labs X-1 - LCD Smartie driven system status display.

Brought to you by the letter E
mrjomphelps Thanks for that idea but unfortunately it hasn't worked for me. Having saved the file as you suggested I then tried to open it. In Internet Explorer and MS Edge I get a completely blank page. In Notepad, Wordpad or Office XML Handler (which uses Notepad) I just get unintelligible "mumbo jumbo". In XML Notepad it states "Data at the root level is invalid Line 1 Position 1 and asks if I wish to open it using Notepad. Answering yes just results in "mumbo jumbo" as before.

The file only opens correctly in Word 2016, (i.e. showing all the elements etc.) but if I try to open any of the other XML files using Word, I get a message that "The file contains custom XML elements that are no longer supported in Word. Saving the fie will remove these elements permanently", and only the data for each element is shown for these files and there is no sign of the various elements themselves.

Don't know if any of the above gives some indication of what is wrong, but it's all very frustrating . Can't help feeling that it is something very simple!
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell Optiplex 9030
OS
Microsoft Windows 10 Pro 64-bit Multiprocessor
CPU
Intel(R) Core(TM) i3-4160 CPU @3.60 GHz x 4
Memory
4.00 GB
Monitor(s) Displays
23-inch full-HD WLED
Screen Resolution
1920 x 1080 @ 60 Hz
Hard Drives
1 x 2.5-inch SATA hard drive
PSU
185 Watt
Browser
MS Edge and IE 11
There must be a new XML format and an old XML format. It sounds like most of your files are in the old format. However, the one file is in the new format, and it therefore opens correctly only in Word 2016. Either that, or maybe the file was saved in Word 2016, and now you have to continue with Word 2016 for that file.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Linux Mint 18.2 xfce 64-bit (VMWare host) / Windows 8.1 Pro 32-bit (VMWare guest)
CPU
Haswell
Memory
4 GB
Monitor(s) Displays
Acer 23"
Screen Resolution
1920 x 1080
Hard Drives
Two hard drives, 1TB each: One for Linux, one for my data.
Keyboard
IBM Model M
Antivirus
Sophos (Linux), Trend Micro (Windows)
Browser
Firefox, Opera
Other Info
I use Samba to share my data drive with the other computers at my house and with my guest session in VMWare Workstation Player.
Back
Top