Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SGML/XML question

Status
Not open for further replies.

msofficehelp11

Technical User
Oct 21, 2008
5
US
Hi everyone,

I am new to Markup Languages. I am studying SGML/HTML/XML and I have a few questions:

1) Can we save a file with .sgml extension(like we save files with .html extension)?

I wrote some sample code in notepad, just to get started and saved it with .sgml just to see if it works and it didn't(I couldn't open it in a web browser). It was still saved as sample.sgml.txt

2) Then I wrote another piece of sample code and saved it with .xml extension.
When I tried to open it with Internet explorer, all I saw was the code that I wrote. I understand this. But when I opened it with Google Chrome, I saw that it opened as any other HTML file would in a web browser. Why is it so?

3) What is Microsoft XML Editor and why is it used?

I did a little Google search on these things, but any comments/ replies here would give me a better idea of what this is all about. Thanks in advance.
 
Q:1)> Can we save a file with .sgml extension(like we save files with .html extension)?
A:Why not?
>I wrote some sample code in notepad, just to get started and saved it with .sgml just to see if it works and it didn't(I couldn't open it in a web browser). It was still saved as sample.sgml.txt
A: The reason is only anecdotal. You don't have file association with the type .sgml that's why notepad.exe save it with it's .txt extension appended to what you typed in the input box. You can simply "quote" what you type in there, for instance, "sample.sgml", then it will save as such. If there is a default file association with .sgml, you don't even need to specifically quote it.

Q:2)> Then I wrote another piece of sample code and saved it with .xml extension.
>When I tried to open it with Internet explorer, all I saw was the code that I wrote. I understand this. But when I opened it with Google Chrome, I saw that it opened as any other HTML file would in a web browser. Why is it so?
A: Browser has the freedom how to render xml file such as using its internal stylesheet or simply concatinate all the text and ignore tag it does not understand as html. IE and mozilla have their own default stylesheet, google chrom may not have it included (yet).

Q:3)> What is Microsoft XML Editor and why is it used?
A: I don't think there is an overwhelming need to use ms xml editor or any other xml editors on the market. They are just specialized text editor augumented with some parsing ability to faciliate the users to have some visual indication of some aspects proper to an xml document or the conflict of the same. Any good text editor, better supporting multiple character encoding ability if the characters to be used is above and beyond ascii..., would do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top