What the heck is XML good for? any practical applications would be enjoyed.
Announcement
Collapse
No announcement yet.
Xml??
Collapse
X
-
Oh, how about Mozilla Firefox? The entire user interface is written in XUL (a XML language), XBL (another XML language) and JavaScript.
Generic XML -- that is XML that isn't written in a specific XML language -- is typically only useful as a format for exchanging data.
Try reading this thread, especially near the end: http://www.codingforum.net/showthread.php?t=11642"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, ES-Membrane project (Github Pages site)
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
-
It helps to describe data really. For instance you have Docbook which describes a set of XML tags for marking up books and articles. XML is also used by SOAP, a web services format. There is an XML format for RDF, which describes relationships between resources. Try reading XML.com, they should be able to explain it better.Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
I code to specs, and test only in Firefox (unless stated otherwise).
Comment
-
ok. so, i have a document (info.xml)
this is its content:
Code:<letter> <to>Bob</to> <from>Sally</from> <date>Wednesday, August 3rd, 2005</date> <content>Paris is nice. The post office fees are outrageous though! Call me!</content> </letter>
i'm only 12, gimme some slack
Comment
-
Originally posted by ianmarloweWhy the heck would I want to?
XML is not the Swiss Army Knife of web development. You, the developer, are. It's up to you to decide if you need to use XML or not, and why.
That said, there's any number of ways you could do it. PHP is one way, if you don't want to do it on the client-side.Last edited by Alex Vincent; Aug 3, 2005, 03:18 AM."The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, ES-Membrane project (Github Pages site)
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Comment
-
In ASP
The full code is commented here ..only the first three lines are necessary to load the xml doc though
Code:<% 'This is the xmldom object we are telling the server that we will be working with xml set xmlDoc=CreateObject("Microsoft.XMLDOM") 'this line tells the server not to look for updated versions of this file while it is open xmlDoc.async="false" 'whatever xml page you wanna load you can change the filename to match yours with a querystring on your redirect statement xmlDoc.load("mypage.xml") set x=xmlDoc.getElementsByTagName("Data") 'from now until the last tag for i = 1 to x.length If childNode.NodeName="Name" Then 'If its not bob then dont work If childNode.NodeValue<>"Bob Edward Patterson" Then 'you can either give them a message or redirect them.. 'here the message is active Response.Write("Its Not Bob<br>") 'Response.Redirect("errorpage.asp") Else Response.Write(childNode.NodeValue) End If Else Response.Write("Node Not Found") End If Next %>
Comment
Comment