Website Babble Webmaster Forums  


Go Back   Website Babble Webmaster Forums > Creating a Website > HTML, PHP, CSS, Javascript & Coding/Programming Topics

Your WB Notifications

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2009, 03:37 AM
Junior Babbler
 
Join Date: Aug 2009
Posts: 1
dahagaku has no reputation at Website Babble yet.
Default How can I open a file with xml extention in a readable format?

I requested a document from my insurance company and it was sent to me by email, as a xml file. I tried to open it by IE browser, MS Word, Excel, note pad, but it opens as codes. I need to print this document, is there any way to open it in a readable format? thank you for your time.
Reply With Quote
  #2 (permalink)  
Old 08-14-2009, 02:07 PM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 250
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

The short answer is no, not in general. Or at least not without more help from your insurance company. That said, you could try Liquid XML, which offers tree- and table-based views of XML documents. (Haven't used it myself, but it looks reasonable.)

Why not?

Because there's no correct way to display an XML document. XML documents will contain a number of elements, comprising tags (the code bits you're seeing) and content (the bit you actually want). Here's an example from Wikipedia:

Code:
 <?xml version="1.0" encoding='ISO-8859-1'?>
 <painting>
  <img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
  <caption>This is Raphael's "Foligno" Madonna, painted
           in <date>1511</date>-<date>1512</date>.</caption>
 </painting>
It's possible to specify a schema for the document, which specifies which elements can be used where. For instance, this page is supposed to meet the XHTML 1.0 Transitional DTD (schema), defined here. There's a line at the top of the page that states this

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Your document will probably have a similar line at the top, presumably referencing a schema created by your insurance company.

The difference between this page and the document you have is that your browser knows how to display XHTML pages (because this is well defined by rules and convention). The same is true for Office 2007 files, which are XML files that meet Microsoft's schemata.

Whereas your document could contain anything (within its schema). It may make sense to show certain parts of it in a table, or a list, but it may not. And it's not really something that can be inferred, beyond the 'suck it and see' table / tree approach, without additional domain knowledge.

Basically, your insurance company shouldn't have sent you that file. It's designed for machines to read (machines that have access to the schema), not you. They should have sent you a PDF instead.
__________________
Pole Exercise - Pole dancing evolved
Reply With Quote
  #3 (permalink)  
Old 08-14-2009, 03:53 PM
Junior Babbler
 
Join Date: Aug 2009
Location: I am currently in Chandler Arizona.
Posts: 29
mbalrog6 has more than the average amount of reputation points
Default XSLT

This is not really a help but you could at least give the insurance a taste of there own medicine. Email them back with something like the following.

Thank you for the document you sent me but since I need it printed could you please send the XSLT that goes along with the XML file you sent me. So that I can get a readable and printable form of the information you sent me.

XSLT is a way of transforming XML to another format. You can transform XML to HTML or Plain Text. It may be more work then necessary though if you don't think you will be getting more XML files in the exact same format.

I know this does not address your immediate issue but it is food for thought.
Reply With Quote
  #4 (permalink)  
Old 08-14-2009, 09:26 PM
lisa's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 7,436
lisa is the Admin and cannot be rated.
Default

You've got to be kidding me? (Don't get me started with insurance companies). Surely that person had to know that XML is not a format you send customer documents in. I would definitely contact them back and ask for a more readable format. That is ridiculous.
__________________
Don't put the cart before the horse.
Plan your website, then create it.

Your Free Guide to Starting a Website
http://www.ThePerfectSiteGuide.com




Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -6. The time now is 04:44 AM.


 Subscribe to RSS

WB Sponsors

flash chat

Home Jobs Online

Search Engine Marketing

Paid Surveys

Web Design Newcastle



 Subscribe to the Website Babble Feeds

2 Create a Website Homepage | 2 Create a Website Blog


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0