New way of doing XML



  • @Farmer Brown said:

    @morbiuswilters said:
    there is nothing wrong with using string concatenation to build XML (assuming, of course, you build valid XML)
    You are very, very wrong. You should always use a proven framework like XML serialization (which has pointed out already). Rolling your own XML generator is what gets you a featured article on the front page.

    If you're writing a full XML generator, you're probably wasting your time since several already exist for the language.  XML serialization is fine if that is the schema format you are going for, but for constructing XML there's nothing wrong with concatenation.  It's simple, fast and effective.  The whole motherfucking point of XML is to be a human-readable and -writeable format.  For example, when working with (X)HTML it's generally tedious overkill to use DOM.  The same thing applies to many uses of XML.

     

    I'm only replying to your trolling to clarify basics for people who might be reading this.  I don't want anyone coming across your "advice" and thinking it is somehow correct; there's enough senseless cargo cult development out there as it is, without forum trolls creating more of it. 



  • @morbiuswilters said:

    The whole motherfucking point of XML is to be a human-readable and -writeable format.

    And all programmers clearly understand it 100% as well, as this thread clearly is evidence of.

    @morbiuswilters said:

    I don't want anyone coming across your "advice" and thinking it is somehow correct

    Right. Because telling them it is ok to roll their own XML generator is ok. Good point. I hope they roll their own XML parsers as well!</sarcasm>



  • Blah blah blah, just say "TRWTF is XML" and </thread>.



  • @Farmer Brown said:

    @morbiuswilters said:
    The whole motherfucking point of XML is to be a human-readable and -writeable format.
    And all programmers clearly understand it 100% as well, as this thread clearly is evidence of.

    Of course not, but minor errors of syntax are easily caught.  However, no "framework" will catch higher-level errors, so it is moronic to claim that using DOM is somehow a necessity that prevents errors, as you have done.  It's just like the empty-headed fools who think strictly-typed languages are superior because the compiler catches errors for them.

     

    @Farmer Brown said:

    Right. Because telling them it is ok to roll their own XML generator is ok. Good point. I hope they roll their own XML parsers as well!

    If by "generator" you mean an XML "framework", then I clearly stated this was not advisable.  However, using string concatenation to construct XML is fine, while you incorrectly claimed it was always wrong.  Generating XML/HTML through DOM is tedious and just as error-prone as string concatenation, if not more so.  If a developer does not understand XML to begin with, then an XML "framework" will only let their abortion of flawed logic come closer to fruition; it will not teach them how to properly utilize the underlying technologies.  Broad statements like "concatenating XML is always wrong" only show you to be a narrow-minded, cargo cult programmer who cannot grasp the concepts at play.  Interestingly, you used to be more possessed of flexible thinking, but clearly the obsessive mental disorder that causes you to follow me around constantly has undermined what little rational thought you were capable of, leaving nothing but a hulking mass of inchoate trolling.



  • @HypocriteWorld said:

    Blah blah blah, just say "TRWTF is XML" and </thread>.

    True. 



  • @morbiuswilters said:

    Generating XML/HTML through DOM is tedious and just as error-prone as string concatenation, if not more so.

    Wrong.

    As has already been posted:

    Teacher aTeacher = new Teacher(5, "Bob"); 
    xmlSerializer.Serialize( aTeacher );

    Have you ever actually wrote any code in your life? Or are you just trolling?


  • @Farmer Brown said:

    @morbiuswilters said:
    Generating XML/HTML through DOM is tedious and just as error-prone as string concatenation, if not more so. 
    Wrong.
    As has already been posted:

    Teacher aTeacher = new Teacher(5, "Bob"); 
    xmlSerializer.Serialize( aTeacher );


    Have you ever actually wrote any code in your life? Or are you just trolling?

    WOW!  YOU'RE COMPLETELY CORRECT!  Ignoring the fact that 1) that isn't DOM, you fat fuck and 2) as I pointed out: XML serialization is fine if that is the format you are supposed to be outputting. 



  • @morbiuswilters said:

    that isn't DOM

    You insisted on DOM. I never did.

    Sounds like your trolling is derailing your internal train of thought.


Log in to reply