Solved

XML files not rendering properly in browser

Posted on 2014-12-12
11
154 Views
Last Modified: 2014-12-16
Really wierd problem here and I would be really grateful if an expert could sort it out.

I received a download of a service manual for a cordless phone and it consists of a folder full of graphic, xml, css, javascript and a couple of html files.

The entire manual can be accessed by one html file called index.html but from there all the main files are xml files.

The problem is that no matter what browser I use I just get junk on the browser pages like endless text with no line feeds. No styles or graphics are rendered.

However I do have a HTML editor called CoffeeCup and it has a preview setup and in CoffeeCup preview I see all the documents and graphics like they are meant to be viewed.

Is there some simple adjustment that would render the files correctly in a browser. I tried Firefox, Chrome and IE and they are all the same.

I can provide a couple of files if required to see the problem, say the index and just one xml file. I have also tried converting a few of the xml files to html but it is time consuming.
0
Comment
Question by:bravotango
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 19

Expert Comment

by:Iammontoya
ID: 40496233
Kinda tough, without seeing what you have, but you can try the following info to see if it help you. Basically this shows you how to do a global reset and add some cross browser compatibility.

https://www.tinfoilsecurity.com/blog/cross-browser-development-tips-css
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40497082
generally xml files need to be converted to HTML on the server using xslt. the raw xml files are generally not going to be formatted or styled because they do not contain information the browser can use to do the job. The preview in Coffeecup works because it has built functions for generating HTML.

If you want it to display in a normal browser, I would suggest that you contact the vendor who supplied the manual to see if you are missing a component, or have to take some step to generate from the materials they supplied.

Cd&
0
 

Author Comment

by:bravotango
ID: 40497429
OK guys, I'm sorry I should have given a bit more information. The xml files are not true xml files but contain many html tags preceded with "html:" and I have never seen that before.
I will include the initial xml file.
Hope this helps.
I should also say this does not concern web development but for reading html files on the desktop.
KM40405444C1-01.xml
0
 
LVL 38

Expert Comment

by:BillDL
ID: 40497500
Do you have the original link to the manual for your phone?

Did it open and display as an online manual when you clicked the link, or did all the files come in a ZIP file?

If they were in a ZIP file, have the files been extracted to different sub-folders or all into the same folder as index.html?
0
 

Author Comment

by:bravotango
ID: 40497702
I do have the original link which is only good for 48 hours and it was a ZIP file.
After extracting the files I deleted a couple of the top level folders which seemed superfluous. I have tried unzipping with all the folders to the root level and the problem persists.
Maybe I should go back to the provider and complain there but I have successfully converted over half of the xml files to html and I can view the manual with CoffeeCup.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 38

Assisted Solution

by:BillDL
BillDL earned 250 total points
ID: 40498805
I did a search for "KM40405444C1-01.xml" and "KM40405444C1.css" that shows as the associated style sheet in the code of the XML file, and both lead to a site where you can download the service manual for a Panasonic KX-TGA520M cordless phone:
http://www.nodevice.com/manual/newmans/panasonic/KX-TG5243MNASVCzip/get26202.html

Below the "Download" button it states:  "Download will be available after succesfull payment or with active subscription", and the page that it resolves to:
http://www.nodevice.com/subscribe.html?id_subscribe=13&item_type=sm&item_id=26202
indicates that a one-off download costs 4.95 Euros.  A download that is made available for 7 days costs 7.95 Euros.

Obviously this company are keen for people who have downloaded the manual for 4.95 not to then host it on other sites, so they have made it non-standard.

It says this about the download:
File size: 5.15 Mb
Manufacturer: Panasonic
Device category: Cordless Telephone
Model: KX-TGA520M Service Manual
File type: ZIP
MD5: dfd8e766169f94b750ddd07a3ece8464

and shows this as the folder and file hierarchy in the ZIP file:
KX-TGA520M.jpgHere's the full list of folders and files:
Folder structure of extracted files

ROOT
|   
\---KX-TG5243M
    |
    \---SVC
        |
        \---KM40405444C1
            |    |
            |   index.html
            |   tag.txt
            |   top.html
            |   
            \------doc
                    |
                    01_00_01.png
                    01_01_01.png
                    01_02_01.pdf
                    01_02_02.pdf
                    01_02_03.pdf
                    01_02_04.pdf
                    01_02_05.pdf
                    01_02_06.pdf
                    01_02_07.pdf
                    04_00_01.png
                    05_01_01.png
                    05_02_01.png
                    05_03_01.png
                    05_04_01.png
                    05_05_01.png
                    05_06_01.png
                    06_01_01.png
                    06_02_01.png
                    06_03_01.png
                    06_04_01.png
                    07_01_01.png
                    07_01_02.png
                    07_02_01.png
                    07_02_02.png
                    08_01_01.png
                    08_01_02.png
                    08_02_01.png
                    08_03_01.png
                    08_04_01.png
                    08_05_01.png
                    08_06_01.png
                    08_07_01.png
                    08_08_01.png
                    08_09_01.png
                    08_09_02.png
                    08_09_03.png
                    08_10_01.png
                    08_10_02.png
                    09_01_01.png
                    09_01_02.png
                    09_01_03.png
                    09_01_04.png
                    09_01_05.png
                    09_01_06.png
                    09_02_01.png
                    09_03_01.png
                    09_04_01.png
                    09_05_01.png
                    09_05_02.png
                    09_05_03.png
                    09_05_04.png
                    09_06_01.png
                    09_06_02.png
                    09_06_03.png
                    09_06_04.png
                    09_06_05.png
                    09_06_06.png
                    09_06_07.png
                    09_06_08.png
                    09_06_09.png
                    09_06_10.png
                    10_00_01.png
                    10_00_02.png
                    10_00_03.png
                    10_00_04.png
                    11_01_01.png
                    11_02_01.png
                    11_03_01.png
                    12_01_01.png
                    13_00_01.png
                    13_01_01.png
                    13_03_01.png
                    13_04_01.png
                    13_05_01.png
                    13_06_01.png
                    13_07_01.png
                    13_07_02.png
                    13_07_03.png
                    13_08_01.png
                    13_08_02.png
                    13_09_01.png
                    13_09_02.png
                    13_09_03.png
                    13_09_04.png
                    13_09_05.png
                    13_09_06.png
                    13_09_07.png
                    13_10_01.png
                    13_11_01.png
                    13_12_01.png
                    14_01_01.png
                    14_01_02.png
                    14_01_03.png
                    14_01_04.png
                    14_02_01.png
                    14_02_02.png
                    14_02_03.png
                    14_02_04.png
                    14_03_01.png
                    14_03_02.png
                    14_05_01.pdf
                    14_06_01.pdf
                    14_08_01.png
                    14_08_02.png
                    15_02_01.png
                    15_02_02.png
                    15_02_03.png
                    15_03_01.png
                    16_01_01.png
                    16_02_01.png
                    16_03_01.png
                    17_00_01.pdf
                    18_00_01.png
                    18_03_01.png
                    18_03_02.png
                    18_03_03.png
                    18_04_01.png
                    18_06_01.png
                    18_07_01.png
                    18_08_01.png
                    18_09_01.png
                    18_09_02.png
                    18_09_03.png
                    19_00_01.pdf
                    20_00_01.pdf
                    21_00_01.png
                    21_01_01.png
                    21_02_01.png
                    21_03_01.png
                    21_04_01.png
                    21_05_01.png
                    21_06_01.png
                    21_06_02.png
                    22_00_01.pdf
                    23_01_01.png
                    23_02_01.pdf
                    23_03_01.png
                    23_03_02.png
                    23_04_01.png
                    23_05_01.png
                    23_06_01.png
                    24_00_01.png
                    24_00_02.png
                    25_00_01.png
                    25_00_02.png
                    25_00_03.png
                    28_01_01.png
                    28_02_01.png
                    28_03_01.png
                    28_04_01.png
                    28_05_01.png
                    29_02_01.png
                    29_02_02.png
                    29_02_03.png
                    29_03_01.png
                    30_00_01.html
                    30_00_01.png
                    31_00_01.html
                    31_00_01.png
                    32_00_01.html
                    32_00_01.png
                    33_01_01.html
                    33_01_01.png
                    33_02_01.html
                    33_02_01.png
                    34_01_01.png
                    34_02_01.png
                    34_03_01.png
                    36_01_01.png
                    36_04_01.png
                    37_00_01.pdf
                    37_00_02.pdf
                    38_00_01.pdf
                    39_00_01.pdf
                    40_00_01.pdf
                    40_00_02.pdf
                    41_00_01.pdf
                    41_00_02.pdf
                    42_00_01.pdf
                    43_01_01.pdf
                    43_02_01.pdf
                    44_01_01.pdf
                    44_02_01.pdf
                    45_00_01.pdf
                    46_01_01.pdf
                    46_02_01.pdf
                    47_00_01.pdf
                    48_01_01.pdf
                    48_02_01.pdf
                    cover.png
                    index.html
                    is_note.png
                    KM40405444C1.css
                    KM40405444C1_01.xml
                    KM40405444C1_02.xml
                    KM40405444C1_03.xml
                    KM40405444C1_04.xml
                    KM40405444C1_05.xml
                    KM40405444C1_06.xml
                    KM40405444C1_07.xml
                    KM40405444C1_08.xml
                    KM40405444C1_09.xml
                    KM40405444C1_10.xml
                    KM40405444C1_11.xml
                    KM40405444C1_12.xml
                    KM40405444C1_13.xml
                    KM40405444C1_14.xml
                    KM40405444C1_15.xml
                    KM40405444C1_16.xml
                    KM40405444C1_17.xml
                    KM40405444C1_18.xml
                    KM40405444C1_19.xml
                    KM40405444C1_20.xml
                    KM40405444C1_21.xml
                    KM40405444C1_22.xml
                    KM40405444C1_23.xml
                    KM40405444C1_24.xml
                    KM40405444C1_25.xml
                    KM40405444C1_26.xml
                    KM40405444C1_27.xml
                    KM40405444C1_28.xml
                    KM40405444C1_29.xml
                    KM40405444C1_30.xml
                    KM40405444C1_31.xml
                    KM40405444C1_32.xml
                    KM40405444C1_33.xml
                    KM40405444C1_34.xml
                    KM40405444C1_35.xml
                    KM40405444C1_36.xml
                    KM40405444C1_37.xml
                    KM40405444C1_38.xml
                    KM40405444C1_39.xml
                    KM40405444C1_40.xml
                    KM40405444C1_41.xml
                    KM40405444C1_42.xml
                    KM40405444C1_43.xml
                    KM40405444C1_44.xml
                    KM40405444C1_45.xml
                    KM40405444C1_46.xml
                    KM40405444C1_47.xml
                    KM40405444C1_48.xml
                    KM40405444C1_cvr.xml
                    logo.png
                    pana.gif
                    pana.png
                    partlist.png
                    PartsEntry.html
                    pbf_note.png
                    script.js
                    ser_ma.png
                    sftri.gif
                    tg5243m.ent
                    tg5243m.hot
                    toc.html
                    top1.html
                    tree.html
                    warning.png
                    _down.png
                    _up.png

Open in new window

You have noticed that there are two "index.html" files?
One looks as though it should be in the "KM40405444C1" folder, and the other looks as though it should have extracted to the sub-folder of that named "doc".  I would guess that you should be opening the first one that sits alongside only two other files in the "KM40405444C1" folder, namely "tag.txt" and "top.html".

I don't know how the PDF files are supposed to open.  I would guess that they will be accessible from hyperlinks and that they will open in the default PDF viewer as a separate window or within the browser via the PDF plugin, and that the author has just left this to whatever browser settings are configured by the viewer.

Something isn't loading when you open "index.html", for example one of the JavaScripts.

Do the manuals from this site require a "reader" by any chance?
Is it possible that you have downloaded the zip file from an unauthorised site and the reader isn't available?

I would contact them.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
ID: 40498951
The post file is sort of XML, but with a mix of xml and html tags it needs a custom parser to convert from the xml-like format to XHTML which is probably in on of the script files that is not loading.

I suspect coffeecup is able to display the page because it is not limited by standards compliance, and is probably running from a folder that can resolve the path to the scripts or has enough feel for the tag soup that it manages to make sense of it.  

The way to page is coded makes me think it was coded by either an idiot or someone who is intent on scamming as much money as they can from something that should be available from the manufacturer without cost.

If it is giving you what you need in coffeecup, I would just go with that instead of letting it twist you up.

Cd&
0
 

Author Comment

by:bravotango
ID: 40501671
I thank you experts for your comments. It seems these files are not what they seem.
As I already said I have converted over half of them to html and CoffeeCup does an amazing job of viewing them so it's just my good luck I had CoffeeCup and also a basic knowledge of HTML otherwise I would have had a useless manual.
I go along with the suggestion that some additional app such as CoffeeCup was needed to view the manual.
Thank you all and have a happy Christmas.
0
 

Author Closing Comment

by:bravotango
ID: 40501675
I suspected this was a difficult question and commend you experts for taking time to resolve it.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 40502331
Thank you bravotango
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40503034
The Questions where there is no easy answer are the most interesting; and it is always better to be challenged.

Cd&
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now