Jump to content
xisto Community
coolcat50

Is Xml A Programming Language Or A Database Language?

Recommended Posts

I have noticed that XML is in the HTML forum when XML is used for storing data, not actually displaying it. This makes me think it is a database rather than programming language. Who here agrees with my views?

Share this post


Link to post
Share on other sites

Well XMl is almost like HTMl except that XMl does not have any fix tags, meaning that each tag is very specific like a heading tag like <h1>; unlike html, xml the programer can define his own tag to corresponde with the data that is being used. Its more like SGML it is a meta language or a language that defines other languages, and so in a way you can define your html just a bit more with specific xml tags that html will translate into the rest of the design.

Share this post


Link to post
Share on other sites

XML is certainly not a programming language, neither is HTML or XHTML. You can not do any calculations with XML, it's impossible to do 2+2 with XML. XML is a general-purpose extensible markup language. XHTML and HTML are also markup languages, but with defined tags and values.

 

It is not a database language either, but XML files can be used as databases because a XML document can easily be parsed by another program. XHTML, RSS and SVG are examples of markup languages that use the XML syntax, but none of them are related to databases.

Edited by Amezis (see edit history)

Share this post


Link to post
Share on other sites

XML is certainly not a programming language, neither is HTML or XHTML. You can not do any calculations with XML, it's impossible to do 2+2 with XML. XML is a general-purpose extensible markup language. XHTML and HTML are also markup languages, but with defined tags and values.

 

It is not a database language either, but XML files can be used as databases because a XML document can easily be parsed by another program. XHTML, RSS and SVG are examples of markup languages that use the XML syntax, but none of them are related to databases.


right-e-o! after reading sm's post, i was thinking to myself...all that typing just to give a simple "no"? :rolleyes: yes, xml like html helps define a language. they aren't one. just like meta tags will define things even further within an html document. it's a markup language. that's what xml is defined as just like html. they can't compete with any programming language whatsoever. these markup languages cannot proccess what a programming language can. now to be more specific, and i will try my best in this in simple terms for understanding, html is used for oraganizing information and how things look. your end result being your webpage. xml is pretty much used for defining information or data and because xml can be used to store information or data, it can be used for a database but is NOT a databased language. again, it is ONLY a markup language

 

now i know there has been a ton of debates about wether xml or even html is a programming language. this will continue until the world comes to an end....but only because people don't understand how things are proccessed in a programming language. heck, even i don't fully.

 

hope this helps. it's hard to define languages in simple terms. why the original question? was there a purpose or were you just curious?

Share this post


Link to post
Share on other sites

Yes. XML, HTML, XHTML, et ceteral are just markup languages and nothing more. They're used for defining settings and creating general purpose documents. Creating documents is the keyword, here. You don't make applications or scripts, but documents, like spreadsheets and letters, documentation, and web pages. If it were a programming language, it would be able to do mathematical calculations and use functions of mathematical functions as well as machine code and libraries. Last time I've heard HTML doesn't require libraries to unlock new functions - you just type and view. It's not turing complete by any means and so can't be a programming language.Saying that a markup language is a programming language means that you have a lot more to learn about computers.

Edited by Tetraca (see edit history)

Share this post


Link to post
Share on other sites

Well, I was using programming language very loosely when I stated that HTML was a programming language. It is in some ways a "programming language". It is telling your web browser to perform certain actions there by "programming" your screen. So in some ways I am correct and in many ways incorrect. Also, I had a very valid point with this question. I am seeing if I can use XML as a secure flat file database system for storing something like my index of files or something.

Share this post


Link to post
Share on other sites

Well, I was using programming language very loosely when I stated that HTML was a programming language. It is in some ways a "programming language". It is telling your web browser to perform certain actions there by "programming" your screen. So in some ways I am correct and in many ways incorrect. Also, I had a very valid point with this question. I am seeing if I can use XML as a secure flat file database system for storing something like my index of files or something.

again, the question has been answered for you unless you want to be more specific. YES, xml can be used for a database

but NO in every sense of the word that xml and html are programming languages. they are languages, yes, but not programing languages. they follow a set of rules based on the language, yea, but like tetraca said, they offer no mathmatical calulations or fuctions. in other words, they don't compute things like a programming language does. they don't interpret 1's and 0's so how can they even speak to your computer?

just because programming languages can be embeded in other computer languages doesn't mean they are also programing languages

anyway, it's complicated. don't lose sleep over it.

yes, again, you can use XML for a database since it's main use is for storing information

Share this post


Link to post
Share on other sites

First off, Amezis is right in everything he says (not that he needs me to say that!).

yes, again, you can use XML for a database since it's main use is for storing information

Yup, though it is targeted differently from a database. To my mind, XML is better for handling string data, since it has no inherent way of calculating which means that that data would have to be handled by the parsing program - whereas you might as well do it all in one go in a DBMS (database management system). That's one of the reasons XML ties in so nicely with web development workflows and dynamic page content.

I would add that in most cases I've encountered, when someone asks whether they should be using a database (and I'm making a distinction between a database that you would parse using SQL or a similar sorting/filtering language/mechanism, since technically any repository of data is (at some level) a database, given that it implies relations and structure within the datasets), they shouldn't touch one with a bargepole.

Sounds like a crass generalisation, but it seems to have worked for me - they either want to use a database because someone said they should. or because they think that lots of data = need a database, and in both cases don't realise that databases tend to take a great deal more planning too, since mistakes will and do come back to haunt you (whereas XML is fairly forgiving, though it you add attributes and elements later your previous data will have blank value). Not saying that's the case here, mind - but in my experience, people who really need a database don't realise it because they're already struggling to see the wood for the trees that have been processed into piles and piles of paper...

In this case, I think that you would not get any real benefit out of a database, since you are dealing with mainly string data that requires no additional calculations (intensive or otherwise), and are unlikely to hit the massive amounts of data where the optimised nature of a database would need to kick in. Nor does it sound like you will deal with (and you can represent many-many parent-child relationships, such as files with categories, where files can fit in more than one category, quite well in XML anyway) complex relationships where the relationships affect how you will parse the data. Basically, all you need to do with a simple index is sort and add.

For the situation as you describe (an indexing system), XML is perfect. Heck, a spreadsheet is fine - nothing wrong with using Excel if there's not a better solution to the problem!

Also, apologies for the broken language of this post..too many long, unnecessary meetings today!

Share this post


Link to post
Share on other sites

A lot of programs allow you to export data into XML Format which tends to be extremely long and hard to rad. Is there anyway to read that data easily and in a more user friendly format? I know itunes allows you to export stuff in XML format but that doesn't help when it is so many pages and hard to read.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.