Stupid ? - What is XML and what program displays it?

K

Kasey156

I have tried opening XML files with various programs and none have displayed
them properly. I assume that FP 2003 should do it, but when I try to open
one with it, it shows only the code - no matter what I do.

Granted, I haven't learned to use FP 03 yet - I'm still using a much older
version. But this XML thing is really getting on my nerves!
 
T

Tom [Pepper] Willett

XML Tutorial & Info
http://www.w3schools.com/xml/default.asp
--
Tom [Pepper] Willett
Microsoft MVP - FrontPage
---------------------------
:I have tried opening XML files with various programs and none have
displayed
: them properly. I assume that FP 2003 should do it, but when I try to open
: one with it, it shows only the code - no matter what I do.
:
: Granted, I haven't learned to use FP 03 yet - I'm still using a much older
: version. But this XML thing is really getting on my nerves!
 
M

Mark Fitzpatrick

It's plain text typically. It's a variation of the language that HTML itself
was based on. You should be able to open it with notepad. If you get a lot
of garbage it could be that 1) the file is corrupted somehow or encoded
wrong 2) it's actually saved in a proprietary binary XML format as some
manufacturers have made their own binary formats for performance and size
improvements.

Hope this helps,
Mark Fitzpatrick
 
K

Kasey156

It's the code that bugs me - and Pepper's link gave me a source to find an
answer to the question - at http://www.w3schools.com/xml/xml_view.asp (His
link, subheader "XML Viewing"):

"Why Does XML Display Like This?
XML documents do not carry information about how to display the data.

Since XML tags are "invented" by the author of the XML document, browsers
do not know if a tag like <table> describes an HTML table or a dining table.

Without any information about how to display the data, most browsers will
just display the XML document as it is."

When I'm trying to view an XML file, I see all that code and get frustrated
- because generally they're something simple, like for instance, I'm trying
to view logs of my son's instant message chats (he's been notoriously naughty
since I first let him on at age 11 and now, for his 14th birthday, after
being banned from anything online for over 6 months, I've just now let him
have his privileges back!), or sometimes it's a help file, and various other
things - I don't recall what exactly, but I am backing up my computer right
now and have run across a bunch of files with that extension, and just get
irritated every time I see it!

What's the point of using a language to store a file on my computer that I
can't read? (I am referring, of course, to the programs I install which put
all this XML on here.) I suppose the answer is that they don't want you to
read it if you're not using their program - hence, the files are effectively
useless once you uninstall their program. That's a presumption, and one made
under stress. *smile*

Thanks for responding, y'all.

Kasey
 
M

Mark Fitzpatrick

Kasey,
Think of it not as code, but data. That helps. Usually it's just a
configuration file, or holds data such as a log. You should be able to open
them in notepad though, but the data itself is usually meaningless unless
you understand the schema, or the layout of the data. XML is used by
programs because, otherwise, they would need some sort of more convoluted
database file or other binary or non-standard format. If you uninstall the
program, let's use messenger as an example, it leaves these files behind
because they are like saved documents. The program created them on your
behalf to do something, just as if you wrote a document in word. Or when you
install a game, then uninstall it the game will usually leave your saved
games behind in case you want to play the game again. You have no idea how
to read the saved game files, but they contain information you'll use if you
ever use it again.

They're not trying to be sneaky or hide anything from you, it's just data
that they use to do their job. If you think the XML files are funny, try
opening a Word document in notepad, it's even worse.

Hope this helps,
Mark Fitzpatrick
 
K

Kasey156

LOL! I HAVE opened word files with notepad! ... and old 95 or 98 files,
etc. etc. I am horrible about saving everything and not updating formats.

Thank you so much for your thorough and patient explanation. You're my
angel for the day!
 
A

Andrew Murray

XML is an off-shoot of HTML - so open it in a browser, and in Frontpaqe or
any editor - Notepad etc.

XML = "eXtensible Markup Language".
 
B

+Bob+

XML is an off-shoot of HTML - so open it in a browser, and in Frontpaqe or
any editor - Notepad etc.

XML = "eXtensible Markup Language".

Actually it's coming from the other direction. XML is a derivative of
SGML (Standardized Generic Markup Language). HTML is also a derivative
of SGML.

While HTML contains both data and formatting information (words and
instructions on how to display them), XML contains only data. In order
to display XML, you need a "style sheet" (XSL or CSS) file to describe
how to format it. The advantage to this arrangement is that you can
have a different XSL file for display on a screen, on a printer, on a
mobile device, etc.

If you are looking at a log file, you would need to find or write an
XSL or CSS file that formats that data into something you can view
comfortably in a web browser.

Typical uses for XML are with XSL for browser display. However, since
it's only a language for containing data, it can also be used for data
storage or to transfer data from one application to another. XML's
structure is very rigid. That allows for the development of standard
tools and for programmers to use whatever tools they want to to read
XML files. This gives us a flexible world where programs can exchange
data without worrying about what application created them - the only
concern is how we want to use the data in our own application.
 
A

Andrew Murray

Maybe I was thinking of XHTML.........

+Bob+ said:
Actually it's coming from the other direction. XML is a derivative of
SGML (Standardized Generic Markup Language). HTML is also a derivative
of SGML.

While HTML contains both data and formatting information (words and
instructions on how to display them), XML contains only data. In order
to display XML, you need a "style sheet" (XSL or CSS) file to describe
how to format it. The advantage to this arrangement is that you can
have a different XSL file for display on a screen, on a printer, on a
mobile device, etc.

If you are looking at a log file, you would need to find or write an
XSL or CSS file that formats that data into something you can view
comfortably in a web browser.

Typical uses for XML are with XSL for browser display. However, since
it's only a language for containing data, it can also be used for data
storage or to transfer data from one application to another. XML's
structure is very rigid. That allows for the development of standard
tools and for programmers to use whatever tools they want to to read
XML files. This gives us a flexible world where programs can exchange
data without worrying about what application created them - the only
concern is how we want to use the data in our own application.
 
T

Trevor Lawrence

I wondered what "XML Notepad" was

Notepad will read an XML file quite OK

I just right clicked on an XML file and the option "Open With.." contains
"XML Editor" (twice in fact), but when I selected this, it actually opened
in Notepad. Perhaps this is a registry setting
 
K

k1sr

Couldn't telly you what's going on there...

Standard Notepad is fine, however XML Notepad puts everything into a nice
tree type view - even with pretty colours...

It's great if you're new to XML (also if you're not)
 
M

MikeR

Kasey156 said:
I have tried opening XML files with various programs and none have displayed
them properly. I assume that FP 2003 should do it, but when I try to open
one with it, it shows only the code - no matter what I do.

Granted, I haven't learned to use FP 03 yet - I'm still using a much older
version. But this XML thing is really getting on my nerves!
Open in a browser.
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top