Slashdot Mirror


Why XML Doesn't Suck

Richard Eriksson writes "Recalling the earlier discussion on why XML sucks for programmers, Tim Bray clarifies his stance on his co-creation, XML, and gets back on his pulpit to declare that XML Doesn't Suck. He writes: 'Let's look at some of XML's chief virtues, then I'll address some of the XML-sucks arguments, in the same spirit that Sammy Sosa addresses a fastball.'"

81 of 384 comments (clear)

  1. Sammy Sosa analogy maybe not the best by cant_get_a_good_nick · · Score: 5, Funny

    in the same spirit that Sammy Sosa addresses a fastball

    You mean he strikes out swinging on three pitches while trying to jack the ball in the stands instead of trying to make contact?

  2. Why XML doesn't suck ... by mustangdavis · · Score: 5, Funny

    .... because people will pay you out the ying-yang to convert their system to use XML ...


    ... enough said!


    Besides, it is a great buzz word!!!


    1. Re:Why XML doesn't suck ... by mrkh · · Score: 3, Funny

      I don't like to admit I'm using XML for just that reason. I generally get one of three reactions:

      1) "XM... did you just say HTML?"

      2) Are you using the .NET parser? Why not?

      3) *left hook*

    2. Re:Why XML doesn't suck ... by bwt · · Score: 4, Insightful

      XML is mostly just a buzzword, used by middle-managers in meetings

      Perhaps, but those meetings are about the fact that the department over there uses technology X and the department over here uses technology Y and the company saves $$$ if the two departments can actually talk because right now you pay people to do data entry twice and you pay more senior people to deal with the discrepancies.

      These managers ask their tech people "How do we deal with this problem" and they hear "XML" and take that up the chain.

      The bottom line is that in a company, system integration costs are the biggest expense in IT. XML decouples data from platforms and that makes integration easier and saves big bucks. So it becomes a buzzword because upper management needs buzzwords to describe things that enable.

    3. Re:Why XML doesn't suck ... by bwt · · Score: 2, Informative

      XML schema has far greater capabilities in this regard than DTD's.

      I certainly agree that 3rd normal form schemas have advantages above even this. The only problem is that RDBMS schemas are tightly coupled to the individual database application that uses them and can't really exist without, well, an RDBMS. Both properties hamper system integration issues.

      You might examine Oracle 9iR2's XML database capabilities, by the way.

  3. Hang on... by Quixote · · Score: 5, Funny

    Going from "XML sucks" to "XML doesn't suck" isn't clarifying your stance! It is doing a 360. Even Bill "I didn't have sex with that woman" Clinton would have a tough time with this one.

    1. Re:Hang on... by Anonymous Coward · · Score: 5, Informative

      Actually its doing a 180.

    2. Re:Hang on... by cant_get_a_good_nick · · Score: 5, Informative

      It is doing a 360

      Going around in circles yet ending up where you started? I think you mean 180.

      We're going to turn this team around 360 degrees.
      - Jason Kidd, upon his drafting to the Dallas Mavericks


      That sounds like the Mavs., going around in circles but never really going anywhere.
      - Me.

      Well, then anyway, they're not all that bad at the moment, best motion offense in the league.

    3. Re:Hang on... by saddino · · Score: 4, Insightful

      That would be "I didn't have sexual relations with that woman" A subtle distinction. ;-)

      And to stay on topic, XML sucks for some things and doesn't suck for others, just like any other technology. A hammer claw is a fine tool for removing a nail, but not as useful for removing a splinter from your finger. Less energy needs to be spent on arguing whether technologies like XML suck or not, and more energy needs to be put into studying their most practical and optimal uses.

    4. Re:Hang on... by Quixote · · Score: 3, Funny
      Actually its doing a 180.
      Argh! You are right. I meant "180". Where's the "preview" button on the brain?

    5. Re:Hang on... by HorrorIsland · · Score: 4, Funny
      Even Bill "I didn't have sex with that woman" Clinton would have a tough time with this one.

      "That depends on what the definition of 'sucks' is..."

      No, I can see him saying that.

    6. Re:Hang on... by mirko · · Score: 2, Funny

      Well, the question is no more about whether XML sucks or doesn't : the question is whether "that woman" sucked or not :)

      --
      Trolling using another account since 2005.
    7. Re:Hang on... by arnie_apesacrappin · · Score: 2, Funny
      Going from "XML sucks" to "XML doesn't suck" isn't clarifying your stance! It is doing a 360

      This reminds me of the Dilbert strip where Dogbert gives Ratbert a book titled something like:

      "Conversational Geometry for Idiots"

      --

      Still, with a plan, you only get the best you can imagine. I'd always hoped for something better than that. -CP

    8. Re:Hang on... by evilviper · · Score: 2, Funny
      Where's the "preview" button on the brain?

      I added one for myself a few weeks ago when I added a windowed case-mod and neon lights...
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    9. Re:Hang on... by JebusIsLord · · Score: 2, Funny

      Reminds me of a (bad) joke.

      "Two wrongs don't make a right, but three lefts do."

      --
      Jeremy
  4. Apple Uses XML by Anonymous Coward · · Score: 2, Informative

    It seems to work well for Apple. It works great for the core database for iTunes, iPhoto and many other apps :-)

    Steve likes it, he really likes it!

    1. Re:Apple Uses XML by flagstone · · Score: 2, Informative

      They use XML files in the regular filesystem to store paths to image/music files, album/playlist data, etc. It's not an XML database in the Xindice sense of the term. The data files themselves are regular MP3/JPG/etc files.

      --
      These people have looked deep within my soul and assigned me a number based on the order in which I joined.
  5. I DO hate XML by ruiner13 · · Score: 5, Interesting
    I have to write SOAP calls for our .NET website, and i'll be damned if XML isn't the most irritating language ever. It wouldn't be so bad if everyone could agree on syntax, but since XML is so vague of a language for every implementation there is a different syntax, even amongst the SOAP standard XML specs. I am currently working on hafing our website make a SOAP call to a PERL::Lite SOAP server, and can't get the .NET to get the right data out of the response, even though the Perl server understands the .NET request fine, and is sending the right response. If it was really the panacea for programmers, there would be no interoperability problems. Sure, a human can look at any XML schema and know what is going on, but computers are the ones who have to deal with it, and they seem to have problems frequently.

    Just my 2 cents.

    --

    today is spelling optional day.

    1. Re:I DO hate XML by mark_lybarger · · Score: 3, Insightful

      sorry for the tools you're stuck working with, but xml as a language/specification is agreed upon. it's in the vendor's implementations where YMMV. i haven't worked with perl/soap, but many people find the xerces parser to work nicely.

      computers don't have to deal with the xml schema, it's someone's implementation of how to handle schema's is where the problem comes in.

      just my quarter.

    2. Re:I DO hate XML by EastCoastSurfer · · Score: 4, Informative

      It never ceases to amaze me how many people think XML is a language.

      LOL, so true. Maybe /. should link to a XML FAQ each time they do a story.

      XML document == data in a well defined format

      XSL/XSLT == tells how to display XML data(think FOP), but is itself a valid XML document

      XPATH == XML query language, which after you look a few examples it isn't too hard

      SVG == vector graphic format stored in an XML data stream

      XML itself is not hard, but until you figure out how all the many pieces fit together it can be confusing. Another thing to keep in mind is that you don't have to use every piece to make use of XML.

    3. Re:I DO hate XML by Mr.+McGibby · · Score: 4, Interesting

      You make a good point, but don't go far enough.

      I think the original poster's point was that XML allows for so much abiguousness, that every tool seems to do it differently and none of them can understand each other. The standard should be so strict as to *require* that if the same representation of a "piece of data" is made by two different tools, the representation should be exactly the same. No reason to say, "oh, you can put an endline there if you want, or you can end a tag these two different ways, whatever suits your fancy.

      Sure, the tools should have been written so that they all followed whatever standard is out there, but we all know that that doesn't happen. The standard should *force* the tool writer to be anal about the standard and follow all the conventions.

      A good compiler should do as good a job as possible to warn you of errors, before they become runtime errors (because those are harder to find). In the same way, a language should be designed such that more errors are compiler than run-time. In the same way, a standard should nearly impossible to create a file that doesn't follow the standard perfectly and still work. XML folks actually tout the opposite as a benefit!

      A tool is written and most of the time is tested with itself, and thus *seems* to work, but doesn't really.

      --
      Mad Software: Rantings on Developing So
    4. Re:I DO hate XML by kalidasa · · Score: 2, Informative

      XML isn't a language. It is a metalanguage. It is vague by design, to allow arbitrary languages to be created.

      XML is not a programming panacea. It is for structured data.

      Suck it up.

    5. Re:I DO hate XML by medeii · · Score: 2, Insightful

      XML does allow for ambiguity. However, it also allows for a lot of control -- it's just that many users don't make use of it.

      If you wanted to, you could write an XML document without any sort of DTD or schema. It validates, because there's nothing to validate it against. Similarly, many companies create XML files without bothering to create schemas, and so they run into problems because they didn't define their own document structures first.

      XML has its own standard, but that standard isn't meant to extend to the content. It's just a few simple rules on syntax, not a tag structure. You are left to do that on your own. Similarly, the tools out there can validate XML documents against schemas or DTDs (ever tried Xalan?) but they can't do a dang thing if you don't have a schema to go with your file.

      You seem to be blaming the W3C and an open file standard for your own problems with document structure. It appears you're not using the right tools.

      --
      got standards? --- http://www.w3.org/
    6. Re:I DO hate XML by rben · · Score: 2, Insightful

      First, XML is a language used to define markup languages. Those markup languages are called XML applications. The XML Application designed to store your preferences for a particular software application may be quite different than the XML application designed to store the data used by that software application.

      All XML must be properly formatted, or well-formed, for a given XML document to be readable by XML parsers. That means that beginning and end tags have to match, the tags are all in lower case, and attributes must be enclosed in double or single quotes, as well as some other rules. It's also possible to define a DTD or Schema which formally defines the XML application and can place restrictions on how the data in a given tag can be represented. The Schema gives the XML application developer the most control over how the XML application documents can be constructed.

      Not all applications need be "anal" about their data files and a certain amount of flexability can be very useful. When XML is used for configuration files, for instance, tags that aren't understood are ignored by default. The XML application schema can be written so that missing tags take on a default value, making it easy to upgrade software applications without having to include a conversion program to update the configuration files. Ignoring unknown tags also means that additional tags can be added to XML files produced and used by one application in order to add data for a second application that uses information from both sets of tags.

      Enforcing the standards for a particular XML application is the job of the DTD or Schema which defines the XML application. Software applications that use the same XML application will use the same Schema. Using the Schema and validating the XML provides just the degree of "analness" that the XML application designer and software application designer desire.

      --

      -All that is gold does not glitter - Tolkien
      www.ra

  6. XML is so good... by BillGodfrey · · Score: 2, Funny

    http://www.ietf.org/rfc/rfc3252.txt

    1. Re:XML is so good... by Randolpho · · Score: 4, Insightful
      The wild popularity of XML as a basis for application-level protocols such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple Object Access Protocol [SOAP], and Jabber [JABBER] prompted investigation into the possibility of extending the use of XML in the protocol stack. Using XML at both the transport and network layer in addition to the application layer would provide for an amazing amount of power and flexibility while removing dependencies on proprietary and hard-to-understand binary protocols. This protocol unification would also allow applications to use a single XML parser for all aspects of their operation, eliminating developer time spent figuring out the intricacies of each new protocol, and moving the hard work of parsing to the XML toolset. The use of XML also mitigates concerns over "network vs. host" byte ordering which is at the root of many network application bugs.
      This is an example of what XML is *not* good for.
      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
  7. XML Confers Longevity by Spudnuts · · Score: 5, Interesting

    Mr. Bray makes a point about the longevity of XML based documents (where he says that tying up documents in a binary format is foolish), but this is a point that (La)TeX users have been arguing for years.

    Will XML really solve this problem? Hopefully the OpenOffice format will help, but if Microsoft maintains its marketshare (and keeps its XML generation limited or even proprietary), are we really better off?

    I'll just stick with LaTeX.

  8. basically why it doesn't suck by xagon7 · · Score: 4, Interesting

    I havn't read the article yet, but XML does NOT suck because:

    1. the data and/or fields added at anytime WITHOUT breaking anything

    2. the data is in a heiracherical format, reducing data replication and allowing for a more sophisticated data structure.

    3. the daya can be changed by a text editor.

    4. and BECAUSE the data is text, it compresses REALLY well.

    1. Re:basically why it doesn't suck by jandrese · · Score: 4, Insightful

      4 is a big old red herring.

      The data compresses so well because it's encoded in a highly inefficent manner. Your average compression algorithm will be able to find more redundancy and give you a better % compressed, but it still won't compare with a human actually packing the data tightly together in the first place.

      or, to take a more information theory POV, there is a certain amount of information in your post, which can be compressed down X percent by default. That same information has to be encoded in the XML version, and has the additional overhead of XML to deal with, so even compresed it will always be larger than the compacted and compresed binary only version.

      XML has a lot of strengths, but compactness is not one of them.

      --

      I read the internet for the articles.
    2. Re:basically why it doesn't suck by evilviper · · Score: 2, Insightful
      The data compresses so well because it's encoded in a highly inefficent manner. Your average compression algorithm will be able to find more redundancy and give you a better % compressed, but it still won't compare with a human actually packing the data tightly together in the first place.

      I strongly suggest you take a complex MS Word document, and convert it into StarOffice 5.0 format, then into OpenOffice 1.0 (XML) format. The filesize of the OpenOffice 1.0 (XML) document will be FAR smaller than either of the previous formats. Add to that the fact that it is using very weak compression (zip) on the XML files.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  9. What's the big deal? by Telex4 · · Score: 4, Interesting

    I don't get all this fuss over XML. It seems to me that it's just a pretty handy markup language for programmers to use to store data in a human-readable (and therefore human-editable) fashion, that (with the help of things like libxml) also happens to be fairly machine readable. It's also extensible (X- duh!) and yet also has its limits.

    Why are there so many /. stories about this? Can somebody explain why this raises people's passions so? It seems to me like arguing the merits of HTML or SGML - it's all so bloody obvious!

    1. Re:What's the big deal? by Anonymous Coward · · Score: 2, Insightful

      If I have a system and I want to publish some data so that you can read it, we used to have to go through a long song-and-dance routine where we decided what byte-order things were in, and which character sets we were using, and exactly to the bit how various fields were aligned. Once we'd hammered out a 40-page design spec of our interop format, you'd go and code a reader to the spec and I'd go and code a writer. Then we'd come back and find we still couldn't talk to each other because of inconsistencies and ambiguities in our spec. So we go through a couple of weeks hammering those out. Now we're sending data to each other, but actually there's a couple of subtle bugs left in your reader, so you suddenly send a final payment demand for $300,000,000 to a granny in Cardiff, get a mass of bad publicity and are eventually forced out of business.

      Nowadays, this procedure has been replaced by "agreeing to use XML". The parsers are standard and implemented on a wide variety of platforms. They've been extensively debugged - far more time has gone into debugging Xerces than you'd ever have put into a custom format parser. They're Free, in both senses. They're easy to use. They're just - better!

    2. Re:What's the big deal? by DeadSea · · Score: 2, Informative
      I felt this way when I first looked at XML. I said, "Boy, XML isn't that exciting. Its a way of formatting data. Its human readable. Whoop-dee-doo."

      The power of XML comes not out of its syntax but out of the tools that are there for it and what you can do with them.

      The nice (if obvious) tool for XML is the parser. XML is specified so that any computer science undergrad could write one in a couple weeks. As a result, there are a lot of parsers out there and they all do the same thing. This makes XML easily read by machines as well as humans.

      The limitation of XML that you will probably next notice that it does not assign any meaning to data. The same data could be structured in many different ways in a document. For example if you were to describe a zoo in XML, one developer would have animal tags nested within species tags nested within cage tags nested within area tags nested within a zoo tag. Another developer would just have animal tags nested within a zoo tag.

      The beauty if XML is that both of the two developers above should have written a specification for the way they did it. Given this specification (in a standard form) you would be able to take a zoo file and verify (automatically) that it matches this specification. (Doesn't have any stray snackbar tags hanging off a lion).

      Furthermore there are conversion tools that can convert between the tags used by one developer and tags used by the other developer. The name of this tool is XSLT and you can write transformation instructions that do a lot of work in just a couple lines.

      After I knew about these few tools, I started to see why so many developers were excited about XML. There are lots of XML tools out there that I don't know about. I'm sure there are several that I could get even more exited about.

  10. I agree, XML does not suck by dsoltesz · · Score: 5, Interesting

    As a web developer & admin, XML is my best friend. I have cases where I need non-webheads to develop content (better yet, portable content), and XML is the only way - they only have to know a basic set of HTML tags, they don't have to worry about HTML validation, formatting, or anything else, and everything they generate is consistent!

    Not ony can I transform their content into different views or formats, but (for example) the same XML file that is used to provide software documentation also is used to build the software GUI and provide tool tips and other forms of context sensitive help.

    No database required. No parsing required. Just a couple libraries and tools, and we're set to go.

    1. Re:I agree, XML does not suck by mjh · · Score: 2, Insightful

      I don't know XML. I used to know HTML. It used to be simple and consistent and easy to manage, too. But I don't know it anymore because it's expanded into this monstrosity that requires validation, formating, and whatnot.

      How long will it be before XML, which may be simple and easy to make consistent now, is "extended" into a similar monster, only to be replaced by some other "savior" specification?

      Why is it so difficult for us to recognize that, except for the most basic of things, automation is hard. There's no silver bullet. The job is hard, and as soon as we think we've got one thing automated, we're going to try to depend on that thing to automate the next thing. Then we're going to discover that we didn't do such a good job with the first thing and we'll have to go back and fix it.

      Automation is hard. There's no silver bullet that will make it easy, not even XML. We may think it's going to solve all of our problems, but it won't. We won't know whether it solves anything until we rely on it. At which point it'll break because it's too simplistic, and we'll have to change it so that it's complicated and not simple and then we'll be again waiting for the next "savior". Call me a skeptic, but I don't think there is one.

      --
      Key to financial independence: Spend less than you earn. Save and invest the difference. Do it for a long time.
  11. money laundering via XML by hashmap · · Score: 2, Funny

    send it vith SOAP.

  12. Try to stop seeing things in Black and White by MyTwoCentsWorth · · Score: 4, Insightful

    XML is much better that anything else in certain situations.

    XML is much worst that lots of other choices in certain situations.

    Why can't you see the shades of grey, and insist on seeing all in black and white ?

    Have fun,

    Daniel

  13. Code embedded in XML by CyberGarp · · Score: 5, Interesting

    I saw a letter to Dr. Dobbs recently that was saying that XML needed to have the ability to embed things like Visual Basic and javascript in it to be really useful. I think that this is a horrible idea. The whole point of XML was to have a generic data model, i.e. one parser to rule them all.

    I've been able to do thing like export MySQL schemas into XML, then using XSLT generate an entire set of base classes providing persistent objects. What was once weeks worth of work, now takes an afternoon (from concept to final product). The whole set is entirely consistent, no misspelled names or changed signatures. When bugs were found, I fixed all the files in one place and rerun the XML/XSLT script. Massive productivity boost. If that isn't an argument on why XML doesn't suck I don't know what is.

    The idea of embedding code in XML is a perverse distortion of what XML is really about. XML would suck if one uses it for unintended purposes. I don't use a hammer to tighten machine bolts, well I guess some people do.

    --

    I used to wonder what was so holy about a silent night, now I have a child.
  14. If xml was a programming languge.... by Anonymous Coward · · Score: 2, Funny

    <include file="stdio.xml" />
    <function name="main">
    <if:xml sucks="true">
    <printf>XML sucks as a programming language</printf>
    <else>
    <printf>XML rules as a programming language</printf>
    </else>
    </if:xml>
    </function>

  15. Tim Bray's Original Post Was Off Base by Carnage4Life · · Score: 4, Informative

    The main thesis of Tim Bray's original post was that he didn't like having to choose between either storing all his data in memory (i.e. DOM) or using a callbacks(i.e. SAX) when processing XML. The problem with this kind of thinking is that although it may have been true two or three years ago that the only way to process XML was via DOM or SAX this is no longer the case.

    There are more classes of APIs supported on multiple platforms for processing XML such as pull-based APIs and cursor based APIs which are represented by the System.Xml.XmlReader and System.Xml.XPath.XPathNavigator in the .NET Framework. Similar APIs exist in the Java world as well as Python from what I've heard. This is besides the current push in some quarters for programming languages that natively process XML (i.e. intrinsicly understand an XML datamodel or datatype).

    Tim Bray's original problem was that he doesn't have a pull-based API for XML parsing in Perl. I pointed out in my kuro5hin diary how the pseudo code he showed as being his ideal for processing XML already exists in C# and .NET Framework. This article on XML.com points to other people who also point out that such pull-based APIs for processing XML are available on other platforms and languages as well.

  16. everyone should read ... by B3ryllium · · Score: 2, Funny

    this.

    Some of you may already have read it, but it's on-topic nonetheless. :)

  17. A bit off topic... by ed1park · · Score: 3, Interesting

    poking around his site I came across this. hehe.

    "Slashdot and Stupidity I visit Slashdot once per day, sometimes more, because they seem to do a really good job of relaying the geek zeitgeist. It's a long time since I read much of the follow-ups, but I thought I ought to this time, and I'm reminded why. How can a publication that caters (on the face of it) to smart people attract the attention of so many shallow, drivelling morons?"

    "Interactivity Again There were a few smart things there in among the chaff on /., and by following back the links in from other blogs, I sure did learn a whole bunch about the state of the programming art as regards XML. Some of the things I said were wrong (or at least open to challenge), and I got fodder for a really substantial follow-up piece, which I'll get around to soon. I don't suppose it's mathematically possible for everyone to get their theses batted around by some tens of thousands of well-informed people, which is a real pity."

    http://www.tbray.org/ongoing/When/200x/2003/03/1 9/ Who

  18. XML is fine. The W3C is what sucks by Ars-Fartsica · · Score: 2, Insightful
    The W3 just can't leave a good standard alone. They keep heaping crap upon the good name of XML (e.g. XML Schema) too far ahead of industry demand. Now they are going to end up assenting to multiple DTD alternatives when they start talking about RELAX/TREX etc. What they should have done was waited for industry to determine the best approach (RELAX, not Schemas), and THEN standardize.

    They can't help it though, the W3 committees are infested by the same lifers who destroyed SGML. It would be refreshing to see a standards committee for once run by people who are suspicious of standards committees. Right now the XML world is run by the people who live off of the small cred being on a committee lends to their consulting biz, etc. so they have no motivation to ever finish the committee's works.

  19. nuts! by SweetAndSourJesus · · Score: 2, Insightful

    I'm running OS X, and it sure sucks that almost all my preferences are stored in easy-to-parse buzzwords!

    XML is very useful. It's not XML's fault that Microsoft isn't implementing it.

    --

    --
    the strongest word is still the word "free"
    1. Re:nuts! by Anonymous Coward · · Score: 3, Informative
      It's not XML's fault that Microsoft isn't implementing it.
      What on Earth are you talking about? .NET includes a fully-conformant XML parser. How else do you think you can write SOAP web services in .NET?
    2. Re:nuts! by CynicTheHedgehog · · Score: 4, Informative
      It's not XML's fault that Microsoft isn't implementing it.


      Are you smoking crack? I hate Microsoft as much as the next guy, but have you seen .NET? Holy cow. Everything having to do with data sets has been XML-ized, from query results to transactions to SOAP...you can't swing a dead cat without writing a schema first. Look at SQL Server 2000...everything can be done in XML. And then ASP.NET is XML-based (using the convention), and lets not forget the .NET app web.config file, which is XML.

      Granted, MS hasn't backported everything to XML (think we'll ever see an XML registry?) but everything going forward has XML tattooed all over it. I happen to love XML, but if anything Microsoft tends toward the zealous side.
    3. Re:nuts! by Kombat · · Score: 4, Informative
      XML is very useful. It's not XML's fault that Microsoft isn't implementing it.

      Ppppppht! *sprays water all over monitor* Microsoft's not "implementing it?" What in the heck do you mean by that? Have you taken a look at anything in the .NET suite lately? The entire system is built on XML. The solution files, project files, assembly manifests, application configuration files, setup binding files - they're all XML! Visual Studio .NET is build extensively on XML, and the .NET API includes some very intuitive and powerful classes for reading, manipulating, and building XML documents. I suggest you do at least a cursory investigation before spouting something so outrageously inaccurate next time.

      --
      Like woodworking? Build your own picture frames.
    4. Re:nuts! by MeanMF · · Score: 4, Funny

      if you were trying to convey the fact that MS has embraced and extended the fsck out of XML, thus totally destroying it and not properly implementing it, then yes, I would agree...

      Micro$oft sure has some balls extending the "eXtensible Markup Language"...

  20. Java Pull-based APIs by Carnage4Life · · Score: 2, Interesting

    XPP which has evolved into Common API for XML Pull Parsing . I don't believe there is a standard pull-based API for XML parsing in the Java world yet although there is JSR 173.

  21. XML as dough by WetCat · · Score: 4, Insightful

    People who say XML sucks are the people who are forced to look at it and change it by hand.
    But XML is not for that!
    XML is like dough. Nobody eats raw dough (it's probably OK to eat it, but it ISN'T tasty), but eats cookies and bread instead.

    XML is NOT for user and/or administrator usual exposure, XML is for application data transfer.
    And applications that require XML to be written by human are only half done: they should be used in combination with HumanInput -> XML generation programs.

  22. From a Programmer's perspectice by Fujisawa+Sensei · · Score: 2, Informative
    Why do I like XML?
    1. Reverse engineering a file parser is much easier . If my current document were some reasonable XML file I would not be spending the hours staring at hex code trying to delimit variable formatted recored.
    2. I'm a little lazy, and tired after doing 1 above and I don't want to write my own parsers.
    --
    If someone is passing you on the right, you are an asshole for driving in the wrong lane.
  23. XML precision sucks by jeti · · Score: 2, Insightful

    No. Really.

    There are IEEE specifications for numbers that are exact down to the bit. And processors actually comply to them.

    Now convert your number to text, using a decimal representation (as AFAIK is recommended for XML). What you get is typically not the number you had before.

    1. Re:XML precision sucks by Simon · · Score: 2, Insightful

      Then don't bloody store your number in a decimal representation. If your application requires numbers in a certain IEEE spec format, them output them using base64, or C style 0xaaff1234 format or something. Or you could even do both. Output as decimal and then output a matching [ieee_fp][/ieee_fp] tag or something. XML is extensible that way. There are so many things you could do.

      A recommendation is just that, a recommendation. If you have more important goals then do something more appropriate. XML doesn't even know what a number is. Elements hold opaque chunks of text or more elements. There is no XML number format.

      Also, for most applications decimal format is fine. Quit dwelling on corner cases...

      --
      Simon

  24. You're confusing SOAP with XML - SOAP is the issue by SuperKendall · · Score: 2, Insightful

    SOAP itself is what you're really complaining about being inconstant between your Perl SOAP and .NET - if the documents parse, then XML is working fine.

    I don't like SOAP for most uses as it's overly complex for things like simple RPC style calls. Simple XML over HTTP can work just fine for how most people use the thing - it's not like everyone is doing distributed transactions or things that really take advantage of the SOAP envelope.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  25. Proper SOAP toolsets abstract developers from XML by Fastolfe · · Score: 3, Insightful

    If you're using the proper tools, and programming with the proper libraries, there's no reason you have to dig down into the XML in order to "write SOAP calls". I've used SOAP for a handful of tasks, and I can't tell you anything significant about how the requests are represented in XML. Developers don't necessarily need to know that. If things are breaking for you, and you're having to debug the actual XML data to figure out what's going wrong, then either your toolset is buggy or you're not using it correctly.

  26. It's just a layer by scrotch · · Score: 2, Insightful

    Seems to me that Plain Text is a pretty good document type. Seems that XML is a way of structuring some of that data. Seems that something else has to be layered over that - specifically, the tags that you create.

    So when you read the file, you parse the text, then the XML, then your tags to get your data into a usable state. XML is is just a way of formatting text. That's where the "meta" comes in. It's not a document type, it's just a standard for creating document types.

    The only way XML makes data long lived, is by leaving it in plain text so that it remains open. Your web app will be replaced in a couple of years. Another app can be written that will read your files, because humans can read your files, not because of some Eternal Data Tag that XML applies. Proprietary files could be handled the same way, except that the format isn't open.

    Now, just because you used XML doesn't mean that your format (ie: your tags, your way of breaking up and marking different elements of data) will be eternal. You can break up a big old text file and mark it up, and your bosses will decide months later that they're looking for some piece of information that you didn't tag. Like they want to pick out all first names from within your "customer comments" tag. You re-write your format. You manually re-write your files.

    It might be more useful for Mr. Erikkson to develop a few of these final file formats using XML to present as standards. A suggested set of XML tags for addresses, for example. Do you tag the street name (Main, Elm) differently from the street type (Street, Drive ) or is that all in a single "Address1" tag? Your XML will never work with my program if the higher level formatting isn't agreed upon. And XML doesn't do that.

  27. Some people just don't "get" XML by binaryDigit · · Score: 4, Insightful

    You read some of the arguments against XML, and you realize that people just don't "get it".

    1 - XML sucks as a language

    Repeat after me, XML is NOT a language. Certainly not in the sense that C++ is a language. XML is a standard that defines how one structures data.

    2 - XML is bloated, I can send binary much cheaper/easier

    DUH. If your application is fine using binary data transfer, then USE it. HOWEVER, many applications that either have to A) communicate with other applications or B) have to deal with varying data sets benefit greatly from using XML. Anyone who has been programming for any length of time knows that while binary is more compact, it is less flexible and potentially more error prone. Want to add a new field in the middle of your data, boy you better not get your software versions mixed. Want to write an app that can do reasonably intelligent things with ANY data it recieves, binary is not the way to go. As with all things in life, use the tool for that which it was intended (vs some peoples view that it is the end all be all of data representation).

    3 - It's slow

    Same as 2 above. If absolute performance is an issue, then by all means, use whatever representation gives you what you need. XML is about flexibility and standardization, NOT performance.

    4 - It's complex

    Well as complex as you want to make it, and it does sometimes encourages more complexity than is really needed, but it doesn't FORCE you into it. If you want/need schemas, go for it. If you need the functionality but in a simpler form, then do that (unless of course you need to communicate with another system expecting a schema, but his is obvious). It's just like C++, you don't HAVE to use templates and multiple inheritence (hell, you don't even have to create classes if you don't want/need), you use the parts of the tool that are useful and provide benefit, you don't use them just because they're there.

    So I don't see what all the bruhaha is about. It has it's strengths, it has it's weaknesses. As with anything, relatively, new, people are trying it in various places. Some of these places not really fit, others do. I've designed apps that benefited greatly, others I've dismissed xml for entirely.

    1. Re:Some people just don't "get" XML by Anonymous Coward · · Score: 2, Funny

      Repeat after me, XML is NOT a language.

      OK
      So what does the 'L' stand for?

  28. Questions, questions, questions.... by mnemotronic · · Score: 2, Funny

    • How is "XML" pronounced?
    • Just the letters "X" "M" "L" ?
    • "Zee mul" ?
    • "Smell" ?
    • "A standard until it was compromised by Microsoft" ?

    How do I encode properties (fields) of my data: child elements or element attributes?

    How do I join the preceding-sibling namespace descendent ancestor-or-self following axis of evil?

    --
    The Russians have won. They have made the world a cesspool of distrust, greed, fear and hate.
  29. Electronic Data Interchange (EDI) by Anonymous Coward · · Score: 4, Interesting

    I work for a VAN (Value Added Network) which is basically a middleman for data. You send an electronic purchase order to us; the company you're ordering from gets it from us. The value we add is we'll say you sent and tell you they got it.

    However, we charge by the kilocharacter of data you send and receive per month. So, for us, XML is awesome, because it increases the size of an ASCII-X12 or EDIFACT document by a factor of 5-a lot more (usually somewhere around 15-20 I think).

    X12 and EDIFACT are standards for business document exchange that have been around for a while, but people are converting to XML because they think it's better (eventhough, usually, they just use the X12 or EDIFACT format, but with XML tags).

    For example, a line item record may go from something like this:

    LIN:0001

    to something like this:

    <LIN_GROUP>
    <LIN>
    <LIN_01>0001</LIN_01>
    </LIN>
    </LIN_GROUP>

    It's not always that bad, but it can also be much worse. (Imagine replacing each instance of "LIN" above with "Line_Item" and "LIN_01" with "Line_Item_Number".) (And why won't that semi-colon after the LIN_01 end tag go away?)

    so-- for us, XML doesn't suck-- it increases our revenue. For our clients, it's sucks, because it increases their monthly bill.

  30. Yes, but... by gillbates · · Score: 2, Insightful
    The only way to achieve interoperability at the software interface level is for there to be exactly one implementation - for example Perl or Linux.

    Hate to burst your bubble, Tim, but this is the same justification that Microsoft to defend their monopoly on PC operating systems. There wouldn't be any portability issues if everyone used Windows(but there might be stability issues!)

    And I agree with the notion that standards are a good thing, however, I have to be realistic at the same time. Any standard sufficiently broad to cover all of the possible bases will be so general as to be useless, or at the least, very inefficient in a large number of cases. The reasons why different standards crop up is because different users have different needs and values. In the UNIX community, portability, stability, and interoperability are highly regarded, where as in the Windows community, flashy GUI's and speed are often more important. Hence, two widely different systems.

    The portability of XML is nice. The fact that it can represent just about anything is also nice. But the nature of XML precludes indexing, which means if I'm searching for a particular record in an XML dataset, I might have to read the entire file. Not a problem for small databases, but for mainframe size databases, this is simply unworkable.

    No, XML doesn't suck. But then again, it's not a silver bullet either. Need I say the adage about hammers and nails?

    --
    The society for a thought-free internet welcomes you.
  31. Just do one thing for me by Reality+Master+101 · · Score: 2, Interesting

    Just make </> close whatever the last tag was. That instantly cuts the size of the files in almost half, and makes them easier to read as well.

    And yes, it could be confusing in a heavily nested file, but nothing says you have to use them. It would be a godsend for database columns.

    --
    Sometimes it's best to just let stupid people be stupid.
    1. Re:Just do one thing for me by illtud · · Score: 2, Insightful
      Just make close whatever the last tag was. That instantly cuts the size of the files in almost half, and makes them easier to read as well.

      Spot the 'lite' user of XML. If you're dealing with anything of any size, complexity or (let's face it) use, then that's a really good idea for unmaintable, buggy XML.

  32. XML==Hierarchical database? by plopez · · Score: 2, Interesting

    It has been my observation that much of 'XML' work with the query engine extension has been a recreation of hierarchical databases. But relational databases were designed to overcome hierarchical databases' failures. It seems we are turning back the clock. For a good critique of XML, C. J. Date's site has an article critical of XML http://www.firstsql.com/dbdebunk/

    --
    putting the 'B' in LGBTQ+
  33. XML is really nice by amalcon · · Score: 3, Interesting

    Two words:
    Human-readable.

    As a programmer, this is the most useful property a data stream can take on. Why? Debugging. The reasoning here is twofold:

    1. Non-parallel development of opposite ends of the data stream:
    It's quite a challenge to develop the code which produces the data and the code which uses the data at the same time. If it doesn't work, you don't know where the problem is. With a human-readable format, you can simply pipe the data in or out of the app directly from a text file, and verify that it's correct yourself.

    2. Debugging:
    Something of an extention of the previous, if you have two bits of code communicating through XML, you can log the bad transmission and read it yourself to find out if the bug is in transmission or reception.

    Now, I won't pretend that XML is the only human-readable data-structuring format, but it has a lot of nice advantages over the others, each of which is covered in the article. XML makes apps a pain to develop, but a breeze to debug--and the debugging is far more important!

    --
    -Amalcon
  34. Solve this Problem by Enonu · · Score: 2, Interesting

    Let's say you are using XML to store the class rosters for your school. Assume the structure, . This has the advantages of being the easiest to parse, you create your data-structure and it's finished, and lastly, writing XSLT to convert your XML to HTML is a piece of cake. However, it's both redundant in the XML itself and in memory.

    Assuming something more efficient, like <class><studentId>, where you simply reference students by an id rather than inlining each student's data, removes the reduplication problem. However, everything else becomes harder. First, you have to be able to reference a student by its id, so you use a hashtable. Next you either have to require that student data comes first, or you have an update phase where you update each of your class objects. Lastly, XSLT isn't cake anymore (show me the roster for class X including all the students details).

    Although this problem exists in any other application that parses data that contains internal references, it's still a major pain-in-the-ass.

    What's the best way to tackle this situation?

    1. Re:Solve this Problem by Artful+Codger · · Score: 2, Informative

      To me your structure is wrong. When designing an XML layout you really have to think through all possible use-cases.

      Assuming that there would be many attributes attached to students, and the classes for a given student are likely to change, I would go:

      abcde
      and other personal fixed stuff
      bio101
      and repeat the class tag for every
      class the student is in

      more students like above

      You then have a separate XML file of classes

      Warshawsky (or use an ID here and have a separate XML file of instructors)
      _
      _
      _ ... and so on

      You then "join" the different files in the transform to pull out specifics. It's very much like SQL joins from among normalized tables.

      If the above seems very difficult, you probably need a good book. I found "The XML Bible" to be useful when I was learning this stuff.

      --

      ... plans that either come to naught, or half a page of scribbled lines...
  35. XML definitely does not suck, XSL does somewhat by Artful+Codger · · Score: 3, Interesting

    ... Like most of folks here, we've successfully used it in several situations, across different languages (Java, Perl, ASP) and different purposes(configuration, data transfer, web page generation, small online data storage, etc). It's da bomb.

    XSL/XSLT on the other hand can be a pain to use in anything other than trivial transforms, in my unschooled opinion. The concept of recursive processing is great, but the math/logic syntax available is byzantine (eg "variable" is really a constant).

    *sigh* I know this will get modded offtopic, but seriously... anyone agree with me, or do you actually like writing transform logic and processing in XSL? Please comment.

    --

    ... plans that either come to naught, or half a page of scribbled lines...
  36. XML is a primary innovation by ites · · Score: 3, Informative

    In the last five years, XML has - for instance - completely revolutionized the way my company writes software. We use code generators that mungle XML definitions into templates (imagine PHP controlling the generation not of HTML but of C or... PHP, and using XML to specify the abstract model in question).
    We don't need schemas, stylesheets, xpaths,... just simple XML. And yet we can write very rich code in XML instead of in native code. Today we're producing about 25 lines of final code for 1 line of XML, and we're pushing this up all the time. My current project generates workflow engines from XML definitions, building a 10k workflow application from a single 500-line XML file.
    My point is that XML is not just a handy way to store data. It is a meta language, able to formally define any concept, no matter how abstract. This is an incredible but subtle thing. The power comes not from XML technology itself, which is really very, very simple once you ignore the W3C fluff. The power comes from the freedom that XML technology gives you, namely the ability to abstract your problem to as high a level as your mind can take it, and to solve it at that level.
    This is difficult, and takes time, but as the XML space settles down it will become clear that this is the real value of the technology.
    The 'con' arguments all appear to be related to people trying to use XML in the wrong place, for the wrong thing, or to replace existing abstractions that work perfectly well.

    --
    Sig for sale or rent. One previous user. Inquire within.
    1. Re:XML is a primary innovation by ites · · Score: 2, Interesting

      It's a good question. We spent a *long* time working with structured data formats like S-exprs between 1991-1997, and although these do support the basic technique of abstracting your way up the expression ladder, XML adds a few small but highly significant things. Some of these are intangible: general acceptance as a standard. Some of them are more concrete: solid support for non-USA languages. Some of them are incidental: wide availability of parsers in any language. Some of them are subtle: essential simplicity.
      There is something about lowering the barrier to a point where virtuous feedback becomes not only possible with effort, but easier than anything else. I think this is what XML does to abstraction, more than S-exprs, SGML or any of the many other formal/semi-formal structured data languages that existed before.

      --
      Sig for sale or rent. One previous user. Inquire within.
  37. XML for Koan by SuperKendall · · Score: 2, Funny

    From article:
    "XML Can Represent Pretty Well Anything"
    "XML has been used to represent, without loss of information...yearly calendars, and Zen koans. OK, I don't know for sure about the koans."

    <koan attribute_to="Chao-chou">
    <question asked_by="random monk">
    Does a dog have Buddha-nature or not?
    </question>
    <response master="true" smileQuizzically="true" useMuResponse="true"/>
    </koan>

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  38. Good For Interchange / Bad For Applications by danmil · · Score: 3, Insightful

    Most of his (excellent) points have to do with exchanging data between applications (with long-term storage being essentially a special case of that). And he's right -- for those, XML is a huge win, and we should all bow down and worship at its feet.

    However, because XML is such a huge buzzword now, people are proposing (or insisting on) using it as a format at the heart of complicated applications. Where anyone would have said 'Use a database' a few years ago.

    In doing so, people are losing sight of the essential beauty of the relational data model. With a RDBM, you, the programmer, have tremendous flexibility about *how* you view your data. This is a huge win inside of an application. XML forces you to commit to one specific view of your data. Yes, if that data needs to live forever and yes, if that data needs to get sent to someone else, than by all means, store it in an XML file. But if you need to *do* something with that data, you're going to be much happier with a relational db.

    -Dan

    --

    I have written a truly remarkable operating system which this sig is too small to contain.

    1. Re:Good For Interchange / Bad For Applications by pmz · · Score: 2, Interesting

      XML forces you to commit to one specific view of your data.

      This is why XML serves best as an interchange format, where files are immutable snapshots of more complex data sets. Perfect for EDI-type apps or reports, but not for "live" data.

      I know from experience with MCAD files (Pro/E, etc.) that static snapshot-type files are much easier to generate and work with than "live" files (files that are modified, stored, modified again, stored, ad nauseum). This is because data that changes over time has to stand up to such wear and tear without wearing out (i.e., the data model has to be outstanding and elegant), but snapshot data models can be pretty crappy and still get the point across.

      Basically, my point is that 1) I agree with what you said and 2) XML does nothing to avoid the fundamental difficulties people already cope with in every data format ever invented (i.e., data models are hard and people should just live with that fact and stop whining).

  39. Nope, no contradiction here. by Jerf · · Score: 2, Insightful

    No. There is no contradiction between "Current XML parsing solutions suck for programmers." to "XML is a good thing overall." It's not a 360 [sic], because those are two seperate dimensions entirely.

    RTFAs.

    (One could argue that no good parsing solution is itself a weakness of XML, but IMHO the problem is that we got stuck going down the wrong road(s) for parsing, with SAX and DOM, both of which look good on paper but lack a certain practicality. If in five years there's still no good solution then maybe it is XML's fault.)

  40. XML only sucks if you apply it where XML sucks... by Bedrock · · Score: 3, Insightful

    I work for a publishing services firm that is focusing on XML-based production of print and online materials, ranging from books to scientific journals to grade-school testing applications.

    Simply put, XML is the best tool available for storing content to be databased, searched, rendered in multiple formats and broken apart and reconstituted into custom documents. XML also lends itself nicely to the representation of complex mathematics using MathML. Because of this, we've based many of our production processes on XML.

    One particular journal we produce is a heavily mathematical, 250 page weekly scientific journal. This journal is produced in both print and online forms, as well as being databased by the publisher. Using tools such as Arbortext Epic (www.arbortext.com) for content editing and Advent 3B2 (www.advent3b2.com) for semi-unattended formatting we are able to produce the journal with a staff of only 10 people. A year ago, it took twice as many people and the end product was not nearly as flexible. In this application, XML rocks.

    However, using XML in every application imaginable without considering whether or not it's the appropriate tool can be quite foolish. A hammer is great for pounding on things, but is pretty worthless in nearly every other application. A lot of the frustration felt by coders implementing XML solutions is due to the fact that it may not be the best tool for the job.

  41. Conversion... by ackthpt · · Score: 3, Interesting
    Um. Ok, I actually read the whole article and it has influenced my to change the direction, or consider strongly doing so, exporting data for archival purposes. We have an old system which will go out the door in the near future and I have been charged with archiving tables from a database in some form which makes they easily readable for auditing purposes, or for the more masochistic, able to be plugged into their happy little desktop database of choice (usually Access.) That said.

    That said, the challenge stems from MV-fields. Those nifty things in PICK which give you the power of keeping associated fields within one table, with as many associations as you like. (for good or for bad, bad usually when it's been abused or good housekeeping neglected.) Piling MV stuff into CSV is just plain icky. Normalizing it first is also icky. However XML may offer a simple, elegant way of keeping it all together in the shape it existed in (which may be important down the road if someone has to produce a report from it (auditors, second guessers, or a55-covering because some account didn't have the right amount of debits or credits for years and the difference needs to be found.)

    I'm off to explore XML more fully. There's probably yet-another O'Reilly book in my future...

    --

    A feeling of having made the same mistake before: Deja Foobar
  42. Why XML is a language by Eneff · · Score: 2, Informative
    language definition

    A language is the set of all ways a grammar allows symbols to be combined.

    (of course, a grammar is a set of rules on how to combine symbols.)

    Under the formal definition, XML is indeed a language. It is not a language useful for defining algorithms, admittedly.

    Can we stop with this "XML is not a language" now?

  43. XML is undeniably a good thing. by ProtonMotiveForce · · Score: 3, Insightful

    Is it the best? Probably not. But it's undeniably an effective lingua franca. A human can easily creat, edit, and manage it dynamically - you want a new tage you just do it.

    Then, it's also as easy on the software side to reflect those changes. The fashionable arguments people use against it (why is it so fashionable to bash anything that happens to be a buzzword?) are non sequiturs in terms of what XML is intended for.

    I use it, hell I probably overuse it. It's so damn easy to parse that I don't want to waste time building a custom format just to save that extra 1K of space or 1/100th of a second.

  44. XML Sucks by magic · · Score: 2, Insightful
    His arguments appear to be based on an assumption: humans are going to hand-code XML and want wierd syntax because of that (e.g. attributes, explicit close tags, the ridiculous XPath grammar). I doubt that 1% of the world's XML (by character count) is hand written today, and think this assumption is a poor one to make.

    I could care less whether "<", "(", "{" or any other character begins a tag. The structure of

    '(a (href "http://www.cnn.com") (text "CNN"))
    beats
    <HREF="http://www.cnn.com">CNN</A>
    by a mile.

    Data should be stored in a way that is easy to parse and unambiguous to design. XML would have been better designed with a way to represent pointers (e.g. LET/LETREC) than the silly attributes and other syntactic nonsense.


    -m

  45. XML is Verbose...compresses beautifully-- NOT!! by coats · · Score: 4, Informative
    I'm an environmental modeler (think supercomputing) , and most of the time the stuff I generate won't fit into dinky little 2GB files. Model data doesn't compress well (and even if it did, it'd take too many tera-ops). And then, forcing it into a sequential access model is not a good idea.. When you have a 10GB data set, you really need direct access to mine the contents, rather than having to "eat the file whole."

    But bureaucrats being what they are (and bureaucrats being in charge of environmental agencies), they've been told that XML is a GOOD THING, and want to force everything into that mold. And it doesn't fit!

    Call it the "law of the instrument," as someone (Poul Anderson, I think, put it:

    As soon as you invent a new and better type of monkey wrench, you can be sure someone will make use of it -- as a bludgeon!
    That's XML, to a tee!

    --
    "My opinions are my own, and I've got *lots* of them!"
  46. XML is great by master_p · · Score: 2, Interesting

    Some people here say that XML is just a buzzword with no real advantages etc. Let me tell you, they are all wrong.

    My company makes apps for the military. These type of apps make heavy use of binary messages exchanged over a network. Up until now, there were numerous errors in the specification, different type systems and other problems between departments. With XML, we managed to do the following:

    1) make a standard for expressing messages. Since messages are tree structures (struct embedded in struct etc), XML is ideal for it.

    2) made a tool to write messages and group them according to context. Now specification docs can be automatically produced by the tool and handed over to subcontractors, whereas previously they were written by hand, contained many errors and had different styles. Now all these problems are gone, changes are documented and saved in the configuration and versioning/control system, messages are automatically versioned and the whole procedure is automated to the point that it takes a few clicks to modify a message and produce a new specification.

    3) made tools which can prepare scenarios for testing these messages automatically. This saved us a lot work!!! it is quite a big amount to test every field of every struct of each message from the up to 10000 message a combat system has (and each message can contain hundrends of numeric fields)!!! thanks to XML, each field's bit width, range, default value, minimum and maximum value and enumeration is known beforehand from the XML data produced for the specification, so by using XSLT messages are automatically converted to C, C++, ADA and Java code along with the relevant code to send, receive and validate each message.

    One of the true benefits of XML is that data are not tied to a specific application. For my company, it has saved us a lot of work, because there is no need to bloat one app with all the functionality, we can make several separate tools which do one job only and operate on those XML data.