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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a basic xml question, please help :D

Status
Not open for further replies.

hazaaaar

Technical User
Jan 8, 2004
3
GB
well i have just started learning xml for a university project, and i am really geting into it, we are learning the basics at a slow pace, but i would like to learn a little faster, i need to know how to view my xml code in internet explorer, but not as the code as it actually would appear online, do you understand? please excuse me if there is something i have miss-understood
cheers
-martin
 
Sorry, dont really understand (but it's late...)
You can view an xml-file in I.E. or any text-editor (Notepad or whatever). Of course there are specialized editors, like xml-spy.
To put it very simple: the xml-file is not an html-file you'd normally show in a browser: it's data that can be formatted.
Usually xml is formatted with xsl to get an html-file.
For some quick info, check out TopXML, or any of the 'partner'-sites listed on the left.
 
so the reason i cannot see it like i would a html document in a browser is because it has to be formatted with xsl....
ok next stupid question, how do i do that?
i'll check it up on the web, but so far i've had little luck
 
Internet Explorer makes a particularly bad XML viewer -- it makes certain assumptions (especially with regards to international characters in your XML) that will cause you problems. If you want to see what a good XML editor can do, request a free 30-day trial of XML-Spy ( You can order a Home Edition for $49, which will do the basics.

The other thing that will trip up people new to XML is that IE will format the XML for you (gee, thanks, now stop it!). I've actually had people send me XML files with the little + and - marks in it. I've also had people complain that the files I send them don't have carriage-return/linefeeds in them (they aren't required by the W3C spec, and just bulk up your file even more than before).

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
hey there
hmm i believe because it's a project for University i have to view it all through Internet Explorer so for now i'm stuck with that... what do i need to convert my xml folder into in order to view it in IE like you do html? cheers :D
 
Good Day,

I just visited and copied the bookstore xml file to my desktop.
I named the file tst.xml and then viewed it with my IE easily.
The address in my IE is: C:\Documents and Settings\Dan Drillich\Desktop\tst.xml

Pretty straight forward - please give it a shot.

Good luck,
Dan
 
If you want to see your XML in IE ( NOT as it appears in text editor), at least you need to write a CSS (Cascaded style sheet).
The CSS will decode the tags you have written in IE-friendly way and display what u want on the browser.

The beauty where is, by changing the CSS you can view the same XML in different ways.
That the whole purpose of XML.

I hope I am not going too far from your question.

Write a file greeting.xml like ,

<?xml version=”1.0 ” standalone==”yes ”?>
<?xml-stylesheet type=”text/css2 ” href==”greeting.css ”?>
<GREETING>
Hello XML!
</GREETING>

The write a file greeting.css like ,

GREETING {display:block;font-size:24pt;font-weight:bold;}

and then open the XML file in IE.
Then u can see probably what u want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top