Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why is XML?

Why is XML?

Scheduled Pinned Locked Moved The Lounge
xmlcsharphtmlasp-netdatabase
69 Posts 49 Posters 18 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Chris Maunder

    Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

    cheers Chris Maunder

    Greg UtasG Offline
    Greg UtasG Offline
    Greg Utas
    wrote on last edited by
    #18

    I never had to suffer through this kind of pain. I mostly worked on a system that was originally developed when memory and CPU time couldn't be frittered away on messages the size of _.jpg_s. Our proprietary language prefixed pack(n) to the type to control a field's width, and it was easy to predict how it would lay out a struct. Developing everything in the same language and standardizing on endianism made it possible to read/write structs directly from/to messages that used TLV encoding (type=parameter id, length=bytes, value=struct, nested if necessary). Very efficient, and no serialization or deserialization. But processors were upgraded independently, so an interprocessor protocol had to remain backward compatible. In rare cases, this meant that an adapter in release n+k had to convert a message received from a processor still running release n.

    Robust Services Core | Software Techniques for Lemmings | Articles
    The fox knows many things, but the hedgehog knows one big thing.

    <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
    <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

    1 Reply Last reply
    0
    • C Chris Maunder

      Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

      cheers Chris Maunder

      K Offline
      K Offline
      kmoorevs
      wrote on last edited by
      #19

      Chris Maunder wrote:

      Is anyone actively using XML as a data transport format?

      Gosh yes, in a number of ways: 0: storing encrypted ftp credentials for desktop apps (yep, right out in the open on a web server) they get changed annually or as needed. 1: advertising program updates for desktop apps 2: uploading client data from desktop apps to a ftp/web server for processing, then maybe reporting 3: downloading client data from web apps to desktop apps (sql server 'for xml' is great) the xml loads directly into a datatable...life is good. Of course, it helps when you control both ends (creation and consumption) of the xml content. :)

      "Go forth into the source" - Neal Morse "Hope is contagious"

      1 Reply Last reply
      0
      • C Chris Maunder

        Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

        cheers Chris Maunder

        T Offline
        T Offline
        trønderen
        wrote on last edited by
        #20

        I see XML (and even more: HTML) as a binary format. Not suitable for human consumption. XML is OK for something generated as a binary serialization, untouched by human hands. Evaluated as such, XML qualities are mediocre. I cannot imagine any binary Tag-Length-Value format worse than XML, by any standard. XML has a single force: You can edit it using vi! (Or for that sake: cat 0 > filename :-)) Not too long ago, I asked (in General Programming) for reactions to my proposal of have a friend of mine provide a lot of tabular data as Excel tables, rather than vi editable files. That was more or less universally condemned: Either, he should provide data as a vi editable text file - in the class of XML, CSV, YAML, JSON ... - or I should develop a tailor-made domain-specific data entry application, doing a complete validation of all input data. Thinking that an Excel sheet might contribute to validation, whatever checks were added, was just naive and worthless. I accept the arguments for a data entry application, as long as we recognize that text based binary formats such as XML, CSV, YAML, and JSON, are unfit for human consumption. They are binary: You have to be concerned about the representation, with regard to use of special characters, quoting, length restrictions, ... The contents isn't free. So, let's make data entry applications that are free. How easy is that, with XML, CSV, YAML or JSON as the user level data entry format? Once we have come that far: Why not use a truly binary format, most likely TLV based? If you admit that the user should never edit the file directly, neither with vi nor cat 0 > file, what is then the advantage of using XML, HTML, CSV, YAML, JSON, ... ? If anyone insists on obtaining the information in an "editable" format, generating it from a binary TLV representation is usually quite trivial. For the applications I manage, I can easily provide stored information in either "editable" format, or even (to some degree) accept input in those formats. Yet, any "editable" format is secondary. Simple tree structures, those that you can easily edit using vi (or cat 0 > filename) are easily handled, but if the data structures require cross-linking, you may need to use a some domain dependent data entry (or data manipulation) tool. You just can't handle complex structures neither in XML, YAML nor JSON; they have to be managed with specialized tools. The essential point for this discussion: XML, as well as other "editable" formats, is

        1 Reply Last reply
        0
        • C Chris Maunder

          Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

          cheers Chris Maunder

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #21

          many years ago my boss dictated that xml will be the transport format for the bank. Once you hit multi million complex records xml choked the server so that was one failed project (of many). We then converted back to csv.

          Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

          D 1 Reply Last reply
          0
          • C Chris Maunder

            Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

            cheers Chris Maunder

            H Offline
            H Offline
            hevisko
            wrote on last edited by
            #22

            Chris Maunder wrote:

            Is anyone actively using XML as a data transport format?

            Jabber does. and it's run over LOW BANDWIDTH networks too ;)

            1 Reply Last reply
            0
            • C Chris Maunder

              Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

              cheers Chris Maunder

              U Offline
              U Offline
              User 10331519
              wrote on last edited by
              #23

              Maybe I’m biased because I’ve been working with XML since it was invented, but I love it. My experience with it predates object serializers and whatnot, and I still find it simpler to roll my own much of the time to ensure that the output properly expresses the object’s purpose and usage. I use JSON for transport where appropriate, such as pulling data into a Vue app, but whenever I need to model data in JSON, I quickly lose patience. The absence of a named root node, namespaces, and attributes leads to a pretty weak representation of the facts that does a poor job of conveying the designer’s intent. Some have argued on this thread that XML is a binary format and not for human consumption, but I would much rather be given some XML to interpret than a bunch of JSON if I am tasked with querying the data. And a named end tag is pretty handy; not a fan of counting curly brackets! Of course, XML is supported by a suite of very mature standardized tools, the likes of which simply don’t exist in the JSON world yet.

              Cheers, Keith

              C S 2 Replies Last reply
              0
              • C Chris Maunder

                Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                cheers Chris Maunder

                U Offline
                U Offline
                UsernamesAreHard
                wrote on last edited by
                #24

                Every so often you come up against a problem that XML is perfectly suited to address. Not that long ago I needed to convert hierarchical CMS data into a structured, multi-file CSV format. I was translating content between two CMSssss. Creating an XML rendering format made exporting the content maintaining hierarchy and relationships trivial. XSLT was the ideal tool to manipulate the XML and re-write it as CSV. Doing it as code would have taken *a lot* longer, but I had an advantage that I spent a lot of time working with XSLT in the past. This approach is definitely not for the beginner. As a transport medium, there's better choices these days that weren't widely adopted or invented when XML was in its heyday.

                1 Reply Last reply
                0
                • C Chris Maunder

                  Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                  cheers Chris Maunder

                  M Offline
                  M Offline
                  Member_14951258
                  wrote on last edited by
                  #25

                  I have been using XML for data transmission and for data specification since 2000. What I like most of XML and XSD is that I can define several namespaces for different fields, this way, whenever I get a tag (e.g. ), it has implicity the scope of such tag, there are no doubt whether the belongs to a scope or to another because it comes with its namespace (e.g. can be "books" or "pencils"). If you define good XSD files, the XML will be parsed and be XSD-compliant with any language (C#, Java, Python...), serializing the XML documents into objects and viceversa. [There are other great things of XML that I really like, but it is not the aim of this discussion.] When I have to deal with personal data or some data regarding "money" (bills, business, purchases...) I always use XSD because I want to map the correct data into the correct field. For other, not sensible, data I use JSON. Important note: Beware of namespaces, the most common error when parsing is when namespaces are in-lined. Some XML are produced badly and the receiver launches weird errors that make developers eventually hate XML. I think that it can be the reason for your intolerance this morning :laugh: For data transmission, if the bandwidth is a problem, you can use EXI (Efficient XML Interchange (EXI) Format 1.0 (Second Edition)), which is better than compressing (gzip) JSON. But make sure that sender and receiver can manage EXI. To sum up, JSON is very easy, but I still prefer XML/XSD for important data or data that must be signed, verified or checked.

                  1 Reply Last reply
                  0
                  • C Chris Maunder

                    Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                    cheers Chris Maunder

                    X Offline
                    X Offline
                    xlg
                    wrote on last edited by
                    #26

                    Yes, we use XML in my company with some complex schemas. But since the beginning we have used LiquidXML to define the schema and generate the code (C++ and C#), otherwise it would have been a nightmare. But I must admit that it works fine: the process is quick, we can easily manage versioning and performances are good. But don't look at the generated code, it's awful! In the last developments, we now use Json (manually) but the data structures are less complex so it's not really comparable.

                    1 Reply Last reply
                    0
                    • C Chris Maunder

                      Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                      cheers Chris Maunder

                      K Offline
                      K Offline
                      Kiriander
                      wrote on last edited by
                      #27

                      I use XML as a data transport format, but I don't serialize objects. I parse the data I want to transport into XML and parse it back on the other end.

                      1 Reply Last reply
                      0
                      • M Mycroft Holmes

                        many years ago my boss dictated that xml will be the transport format for the bank. Once you hit multi million complex records xml choked the server so that was one failed project (of many). We then converted back to csv.

                        Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

                        D Offline
                        D Offline
                        Daniel Pfeffer
                        wrote on last edited by
                        #28

                        Mycroft Holmes wrote:

                        <snicker> many years ago my boss dictated that xml will be the transport format for the bank. Once you hit multi million complex records xml choked the server so that was one failed project (of many). We then converted back to csv.</snicker>

                        FTFY :)

                        Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                        1 Reply Last reply
                        0
                        • C Chris Maunder

                          Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                          cheers Chris Maunder

                          M Offline
                          M Offline
                          Mathieu Cartoixa
                          wrote on last edited by
                          #29

                          XML can be great, but there is more to know about it than most people realize (namespaces for instance). There is a reason why .NET Core switched back from JSON to XML for projects descriptions... When done well I think it can be close to the sweet spot between human and machine readability (if you need that). It has comments, and can natively handle many data types that JSON cannot (like dates). If bandwidth is you primary concern then perhaps you should consider binary serialization? When done bad you get almost any of the OGC Standards[^]... The best thing about JSON is its tight integration with Javascript, which is a nice feature (and why it "won" the web).

                          Mathieu Cartoixa

                          1 Reply Last reply
                          0
                          • C Chris Maunder

                            Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                            cheers Chris Maunder

                            L Offline
                            L Offline
                            LesCooper
                            wrote on last edited by
                            #30

                            I have used both XML and JSON over the years. XML has full and proper support for XSD and great XSL. It also allows really tight security for messaging. Not had the same tightly secure messaging experience with JSON can not completely judge this! Is the a standard for doing it - I don't know. XML appears to me to be much better able to be validated. JSON is very quick JSON Schema seem to be quite good but not as tight as XML. In the world where I used XML with the full security packages around the payloads (of XML) there was signing and encryption - the way to work was to peel the layers of the onion away slowly gaining greater trust as you proceeded into the payload. This works very well for confidential business messaging. I do enjoy the simplicity of JSON but is it too simple?

                            1 Reply Last reply
                            0
                            • F Forogar

                              oooh! That is SO useful - thanks for the link, Marc!

                              - I would love to change the world, but they won’t give me the source code.

                              A Offline
                              A Offline
                              Alex C Duma
                              wrote on last edited by
                              #31

                              I think there is a feature in VS: Paste JSON and XML as a Class -- Visual Studio Magazine[^]

                              Alex C. D.

                              1 Reply Last reply
                              0
                              • F fd9750

                                Some guy somewhere had a bad dream and woke up with the idea: now how can I make something totally confusing and complicated which computers can read effortlessly but humans will find totally incomprehensible? He came up with XML and ticked all the necessary boxes/requirements perfectly. Personally I am not a fan of javascript but boy did they get that JSON stuff right. Whatever programming language you care to use the JSON data exchange is dead easy to follow and debug. Leave the hard interpreting stuff to computers, not humans. For god's sake: that is why we designed them for !!!

                                U Offline
                                U Offline
                                User 4243366
                                wrote on last edited by
                                #32

                                I use XML all the time with LINQ in C#. It's easy and simple.

                                "I used to write COBOL, now I can do anything..."

                                1 Reply Last reply
                                0
                                • U User 10331519

                                  Maybe I’m biased because I’ve been working with XML since it was invented, but I love it. My experience with it predates object serializers and whatnot, and I still find it simpler to roll my own much of the time to ensure that the output properly expresses the object’s purpose and usage. I use JSON for transport where appropriate, such as pulling data into a Vue app, but whenever I need to model data in JSON, I quickly lose patience. The absence of a named root node, namespaces, and attributes leads to a pretty weak representation of the facts that does a poor job of conveying the designer’s intent. Some have argued on this thread that XML is a binary format and not for human consumption, but I would much rather be given some XML to interpret than a bunch of JSON if I am tasked with querying the data. And a named end tag is pretty handy; not a fan of counting curly brackets! Of course, XML is supported by a suite of very mature standardized tools, the likes of which simply don’t exist in the JSON world yet.

                                  Cheers, Keith

                                  C Offline
                                  C Offline
                                  Chris Maunder
                                  wrote on last edited by
                                  #33

                                  The ability to describe, and not just store, your data and abide by a published schema while remaining flexible and easily transformable and human readable is definitely a wonderful thing. I will give you that.

                                  cheers Chris Maunder

                                  1 Reply Last reply
                                  0
                                  • C Chris Maunder

                                    Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                                    cheers Chris Maunder

                                    S Offline
                                    S Offline
                                    Steve Naidamast
                                    wrote on last edited by
                                    #34

                                    Comma delimited data is just so much easier without all the fuss. It is also more efficient...

                                    Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                    J 1 Reply Last reply
                                    0
                                    • C Chris Maunder

                                      Just why. I spent an hour fighting with XmlSerialisers to try and get my object mapped to a schema. Changing names, trying to get attributes setup, dealing with CDATA. I gave up. I got so fed up I simply wrote the XML directly as a raw string. If I could have kicked it I would have kicked it. I totally get the beauty of having data in a class and throwing it at different serialisers and having it Just Work. Switch between XML and Json and maybe binary and text and build out this whole massive ecosystem that screams "I'm trying to do too much!". But dear lord. It's like root canal surgery. Is anyone actively using XML as a data transport format? I get that we all use it in things like XAML and ASP.NET pages and the whole HTML thing, but as something that is not seen or edited by humans, that needs to be cognizant of bandwidth, is it still being used in that manner or am I just really, really intolerant this morning?

                                      cheers Chris Maunder

                                      S Offline
                                      S Offline
                                      Sr_Dogmeat
                                      wrote on last edited by
                                      #35

                                      I use it all the time, but I also always describe my message formats in XSD. That is the easiest way to get the code generators on all platforms to properly parse one’s messages.

                                      1 Reply Last reply
                                      0
                                      • S Steve Naidamast

                                        Comma delimited data is just so much easier without all the fuss. It is also more efficient...

                                        Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                        J Offline
                                        J Offline
                                        Joseph T Adams
                                        wrote on last edited by
                                        #36

                                        For some kinds of very simple data, some dialect of CSV may be ok. But in 3 decades of software development I've rarely found it it be an adequate solution, much less the optimal one.

                                        S 1 Reply Last reply
                                        0
                                        • U User 10331519

                                          Maybe I’m biased because I’ve been working with XML since it was invented, but I love it. My experience with it predates object serializers and whatnot, and I still find it simpler to roll my own much of the time to ensure that the output properly expresses the object’s purpose and usage. I use JSON for transport where appropriate, such as pulling data into a Vue app, but whenever I need to model data in JSON, I quickly lose patience. The absence of a named root node, namespaces, and attributes leads to a pretty weak representation of the facts that does a poor job of conveying the designer’s intent. Some have argued on this thread that XML is a binary format and not for human consumption, but I would much rather be given some XML to interpret than a bunch of JSON if I am tasked with querying the data. And a named end tag is pretty handy; not a fan of counting curly brackets! Of course, XML is supported by a suite of very mature standardized tools, the likes of which simply don’t exist in the JSON world yet.

                                          Cheers, Keith

                                          S Offline
                                          S Offline
                                          Sr_Dogmeat
                                          wrote on last edited by
                                          #37

                                          Your points are spot on. XSD is the best data description language I have encountered. I use XML Spy to create my schemas and then everything under the sun can read the schema and produce working code that is schema compliant. I was really disappointed with JSON schema, one would think they would have plagiarized from xml schema but no... perhaps the people that like JSON are dealing with flat or very limited hierarchies? Perhaps the are lacking variant nodes (choice). And perhaps they do not have to deal with patterns in strings for legacy systems?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups