Gw Temp


Tutorial - 'What is XML?' by Joey Peters

An item about Programming Languages posted on


What the hell? Please don't read if you're an easy to make fun of nerd. I mean, hi. I like insulting people, because I suck, and so do you.


Hey shit, what is XML? I'll tell you sonny. But not until you bow down and take
it like a man. XML is highly likely to become more evident in the future of IT.
But why? Because managers are idiots. They see something on TV promoted by
Microsoft and they think they all need it and stuff and they start crying like
little faggots when they don't get it. That's the true story behind XML. But XML
can be useful. And it actually is. Especially for communication between digital
things, like you and that slut in Canada, talking in half decent English about
how long your dick is while showing your pickle faced mug on the webcam.

But seriously, what the fucking fuck is XML? XML is the way 'humans'
communicate. We don't know what the fuck we're talking about until we define
what we're talking about. Like, for instance, I mention 'car'. And then the
other person thinks like "wtf, car?". But I'm XML, so I just continue and
blatantly ignore the other person. It's like when you're talking to your
parents on how that programming language that you found rocks and they all try
to understand but fail like a piece of shit but just claim to understand what
you're talking about outputting some random hilarious shit about how "compilers
can make boats".

Maybe you know HTML? HTML is also a markup language. Markup means the
programmers and designers of the language were too single minded to come up with
something better. Markup means you sort of tag things. And tags can be
inherited. Like in HTML you can do
<h1&rt;<center&rt;HELLOT</h1&rt;</center&rt;. There is another type
of markup language called XSL, this is also important later.

But WHAT THE FUCKING HELL can XML do for you? Well, first of all, I was
not supposed to write this tutorial. Because LMS wanted to write it, but
I'm a bitch, yeah, a programmer, a professional job slayer. I slay those
jobs that are so easy that only uneducated fools like you would take and which
you would then whine about not getting because that mexican does it for half the
price. Just shut the fuck up. Anyway, also, there was a "html" tutorial and I
read it and I was all like "wtf no".

Still, XML is probably better than HTML. That is because it can output HTML. And
if it doesn't, your server software sucks. And if it runs on linux, you suck,
because you can just download libxml2 and libxsl and write a simple xml->html
parser in 40 fucking minutes.

Great, so, still, we don't know what the fuck XML does. You just got to love me
to this point don't you. Maybe you know HTML. And PHP. And you think you're
totally the shit. Where HTML and PHP are the biggest failures ever in our world
is being used by the biggest failures in the world, then yeah, just continue
using it. XML isn't worth shit either. Generally web development isn't worth
SHIT. Just LOOK at what kind of idiots can make money from it, even I can. Come
on, what the fuck is this?

In XML you have to make your own fucking tags. You want a header tag so you can
show your nice big rainbow smeared with poo text website title? Then you got to
make it yourself. Yes, yourself. In CSS, you make the style, you define what it
will look like, how it will be 'styled', what color of 'feces' you want, HTML selects the feces FOR YOU in most tags. Then,
in XSL, you format the XML data, so how it will be partitioned and 'aligned'.
Heck, here you could even make it compatible with HTML. If you don't suck.

Browser that support XML rock. Browser that don't support XML suck (like you).
With that I mean Internet Explorer 6 and FireFox. So, let's try to make a stupid
website. XML should only describe the 'content', the 'data'. CSS and XSL do the
stupid layout things.

So, first, we need to have some data, there can only be one inheritatant node.
No more. That means only one [website] etc.

[header]Hello world[/header]
[title] What?! [/title]
Well hello world

Like that. And now we need to show it with XSL. XSL transforms the XML data into
something useable by the browser. It's a modern stylesheet thing.

[xsl:stylesheet version="1.0"
[xsl:template match="/"]
[h1][xsl:value-of select="website/header"][/h1]
[xsl:for-each select="website"]
[b][xsl-value-of select="title"][/b]
[p][xsl-value-of select="paragraph"][/p]

And a winner is you. Then, you need to link it to the XML document. You do that
by adding a simple link rel to the top of the XML document: [?xml-stylesheet
type="text/xsl" href="THIS IS THE URL FAG"?]

So that's really basic. Try getting it to work. You probably can't. Because
you're a windows user. And you need instructions for everything. Even double

Try to learn more about XML on W3C. Seriously, there isn't much to XML. It's
just a bunch of tags you make up yourself. And then you just write something in
XSL. And CSS. Fun. If you want to use XML and PHP, you have to send a

header("Content-type: text/xml");

If you want to know whether it's supported or not, search for text/xml in the
USER_AGENT environmental variable ($_SERVER['USER_AGENT']) or more ideally,

But PHP sucks. Anyway, is that really all? YES XML IS REALLY THAT SIMPLE!!! Next time, let's talk about XSL but even more offensive and retarded. I can't really get to the depth of it now because this is XML, and basically I explained why it's there. What I haven't done yet is...

Why isn't it used? Well. Because. (i win). No, really, XML isn't really that great. If you want it to be backward compatible with most agents, you need to reparse the document, and this costs CPU load. And as a database structure, it really sucks, because it's still really slow. And at the same time, it's one of the easiests and fastest to parse languages out there. Man. I just make my own damn database and webdocuments in binary format. It just runs better.