You are not logged in.
Pages: 1
I wonder why some applications such as android apps, gtk builders (gald), qt builders (qtcreator) use xml files?
user@localhost $ grep -rnw "." -e "hacking"
Offline
andriod apps are written in java (then the bytecode is run on davlik-vm), and the java ecosystem uses quite a bit of xml.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Xml is no matter how archers seem to dislike it a very nice format.
Both human and machine are able to read and understand that pretty well. It's language neutral and can be validated syntactically and semantically using (human readable) xml schema definition.
Offline
I wonder why some people assume this was a question, just because there is a question mark in the end?
I don't see why they shouldn't use XML. What are the objections?
Offline
I don't see why they shouldn't use XML. What are the objections?
xml is complex, and the cost of that complexity can be greater than the benefits. There's nothing wrong with xml, but the proper tool is often something far simpler.
Offline
xml is complex, and the cost of that complexity can be greater than the benefits. There's nothing wrong with xml, but the proper tool is often something far simpler.
I think that summarizes my feelings nicely. In my mind, XML is amazing. It's clean and easy for both computers and humans to use. But when I actually try to start using it, it drives me crazy.
For example, for a budgeting application I made, I was going to use XML for the file format. Instead, I used CSV. XML would have been overkill.
Offline
But when I actually try to start using it, it drives me crazy.
I recently had to write a nightly process that converts Foxpro to XML via SQL
Bloody painful, but at least the SQL in the middle made it a little less masochistic.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
xml is complex, and the cost of that complexity can be greater than the benefits. There's nothing wrong with xml, but the proper tool is often something far simpler.
I feel the same. People always says that xml is human readable, but its to complex/verbose to be *easily* readable. I think that is a good format to storing info, and under the hood message passing. But for config files that will be edited by humans (and not by machines) is too painful.
I prefer some more loose format for manual editing, like YAML or json. It's really no so powerfull as xml but don't make my eyes bleed.
Offline
i just think in this way
why we are still using uml definitions to build objects? the syntax's object from java and c++ isn't good? so why we still using this to dev? ...?
user@localhost $ grep -rnw "." -e "hacking"
Offline
Awebb wrote:I don't see why they shouldn't use XML. What are the objections?
xml is complex, and the cost of that complexity can be greater than the benefits. There's nothing wrong with xml, but the proper tool is often something far simpler.
Often people misunderstand what XML is exactly I think, it's not meant to be a tool for serializing data. I like JSON as a serialization standard personally. XML is not equal to JSON in terms of intentions. They are two completely different things that allow you to accomplish some of the same things.
XML is just a notation for trees, little more than a verbose variant of Lisp S-expressions; and a way to define tree grammars, a poor-man's BNF. Yet this simple basis has spawned scores of specialised sub-languages: for airlines, banks, and cell phones; for astronomy, biology, and chemistry; for the DOD and the IRS.
http://homepages.inf.ed.ac.uk/wadler/xml/
Philip Wadler is a professor of CS at the University of Glasgow in Scotland and one of the people who helped create GHC (Glasgow Haskell Compiler).
Last edited by Nisstyre56 (2011-08-21 03:11:34)
In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage
Offline
I personally find XML a pain to work with, and calling it "human readable" is a joke. It almost equates to suggesting that people should read plain text HTML files, instead of the "less efficient" display in the browser.
I wonder why some people assume this was a question, just because there is a question mark in the end?
Oh come on, cut him some slack. I'd say that most people on here are not native English speakers.
Offline
I personally find XML a pain to work with, and calling it "human readable" is a joke.
You need a better viewer. I advise vim.
It almost equates to suggesting that people should read plain text HTML files, instead of the "less efficient" display in the browser.
You are aware it was intended as a replacement for HTML?
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
personally I prefer xml over html -- only because there is structure and not randomness as you often find with HTML pages(unless you use strict DTDs). You cannot skip end tags in xml which IMO makes it more structured.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
You need a better viewer. I advise vim.
Cute.
You are aware it was intended as a replacement for HTML?
No, I'm not aware, because it wasn't.
http://xml.silmaril.ie/replacehtml.html
EDIT: If your first quote was sincere: I use vim already, and I think that it (XML) is just a pain to work with in general, regardless of my editor.
Last edited by cesura (2011-08-21 04:49:03)
Offline
fsckd wrote:You need a better viewer. I advise vim.
Cute.
EDIT: If your first quote was sincere: I use vim already, and I think that it (XML) is just a pain to work with.
I'm serious, in a silly sort of way. What I mean is if it seems hard to use, that sounds more like you lack the right tools. I can hardly see reason to blame the language.
If you prefer, I can suggest Emacs.
fsckd wrote:You are aware it was intended as a replacement for HTML?
No, I'm not aware, because it wasn't.
http://xml.silmaril.ie/replacehtml.html
Thanks for that. I misunderstood it's purpose.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
I'm serious, in a silly sort of way. What I mean is if it seems hard to use, that sounds more like you lack the right tools. I can hardly see reason to blame the language.
It may just be a personal distaste, or possibly even a lack of experience. I do a lot of web design, for projects and freelance, so I am quite accustomed to HTML and such. Maybe I don't like the unstructured paradigm that XML takes (well, it's strict, but the tags are user-generated).
If you prefer, I can suggest Emacs.
NOOOOOO!!! RELEASE THE KRAKEN!!!
Thanks for that. I misunderstood it's purpose.
I really do apologize for the tone I had there. I had originally misinterpreted your post as facetious and unnecessarily sarcastic.
Offline
brad,
Having inherited html -- well jsp pages -- in projects which weren't well defined and had end tags missing all over the place, I would much rather prefer XML which has user generated tags, then having to understand the mess someone leaves behind in HTML
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Having inherited html -- well jsp pages -- in projects which weren't well defined and had end tags missing all over the place, I would much rather prefer XML which has user generated tags, then having to understand the mess someone leaves behind in HTML
Ah, I can certainly relate. However, if written correctly, HTML seems no less organized than XML. You know, a wise monk named fsckd once wrote "I can hardly see reason to blame the language."
Offline
fsckd wrote:I'm serious, in a silly sort of way. What I mean is if it seems hard to use, that sounds more like you lack the right tools. I can hardly see reason to blame the language.
It may just be a personal distaste, or possibly even a lack of experience. I do a lot of web design, for projects and freelance, so I am quite accustomed to HTML and such. Maybe I don't like the unstructured paradigm that XML takes (well, it's strict, but the tags are user-generated).
That's the thing. In C, functions are user generated and yet I can jump around with ease. But, you know, personal preferences are personal preferences. I prefer whiteboards over text editors and text editors over monstrous word processors, etc.
fsckd wrote:If you prefer, I can suggest Emacs.
NOOOOOO!!! RELEASE THE KRAKEN!!!
I was being serious again, in a silly sort of way. I think Emacs might be better at processing XML than Vim. I could be wrong here.
I really do apologize for the tone I had there. I had originally misinterpreted your post as facetious and unnecessarily sarcastic.
No need to apologize. I could have worded it better. This is a learning process for me.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
XML is a terrible format for configuration as there is usually no reason for more than two sublevels (globals, sections, and subsections). Here the verbose closing tags and strict hierarchy provided by XML are unnecessary and distract the reader from the actual content. Instead of looking on the left side of the equal sign for variables and on the right for values, you often have to look at whole lines and find the brackets.
However, in GUIs, you need a strict widget hierarchy and verbose closing tags. You can have images embedded in buttons embedded in toolbar sections embedded in toolbars embedded in panes embedded in horizontal splits embedded in windows. Without using something like XML, determining where a widget is in the tree would be a real pain.
Offline
It's a question of the right tool for the job. Sometimes XML is the right tool. But more often than not, it isn't. We now have nice tools like json for data serialization and yaml for human-readable config files.
Offline
Pages: 1