Bsic XML

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
littlecoder
Forum Commoner
Posts: 26
Joined: Fri Oct 17, 2008 4:36 am

Bsic XML

Post by littlecoder »

Hello ,

I am very new to XML . Please can any one , inform me how to save an XML file ?
(i.e with what extension).
Thanks in advance
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Bsic XML

Post by papa »

save as .xml
littlecoder
Forum Commoner
Posts: 26
Joined: Fri Oct 17, 2008 4:36 am

Re: Bsic XML

Post by littlecoder »

Hi ,
Thanks ,
I also want to read the XML data through javascript . My XML file name is first.xml .
My html code is :
<html>
<body>
<script langauge = "text/javascript">
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.load('first.xml');
xmlObj=xmlDoc.documentElement;
alert(xmlObj.xml);
</script>
</body>
</html>
But i am not getting any output . What will be the problem ?
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Bsic XML

Post by papa »

I'm no js expert but try printing it out on the page instead of using the alert.

And write a legal html document :)
Post Reply