Jump to content

xml-files on the web

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
I've started to find sites built in xml and I started to wonder how that works

anyone can explain?

I know of XHTML, but about how an xml file is done to show up as any normal html page, I don't know yet...
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Every site I have ever visited or coded has been done in XML.

HTML and XHTML are both XML.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
why can't you understand what I'm telling and answer my question instead of just arguing?

I'm starting to find pages built like

https://us.battle.net/login/login.xml

which is true xml based, not html or xhtml as far as I can see on sources. and I wonder how it is done. take a peak on the source and see that it's not html or xhtml, its xml.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I am not arguing with you. I was stating that XHTML/HTML is indeed XML.

XML can be styled using a language called XSL. You can read about it on W3Schools: XSLT Tutorial

This is the XSL file used to style the page you linked: https://us.battle.ne...n-battlenet.xsl

If you look carefully, you can see that there is indeed normal XHTML (such as <strong>) and CSS (such as display:none) that is used to code the page.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
hmm.. great answer. what's the point of using XLS instead of XHTML?
do you know any advantages or disadvantages?
advantage(?) I can see is that normal people can't follow the code as easy...
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
As you can see, the XML file itself is very small, really just a frameset for the content. While this could have speed benefits, it is more difficult to manage everything in one XSL file, instead of having separate files for CSS, JS etc.

CSS + XHTML vs XML + XSLT

It is definitely worth noting that in HTML 5.0 (coming soon to a browser near you :)), the whole <body>, <head>, <div> idea will be scrapped. Instead, the page will look a lot more like XML itself!

This is HTML 4.0:

Posted Image

And this is HTML 5.0:

Posted Image

Pretty much pure, standard XML itself.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#7
jwxie518

jwxie518

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,180 posts
wait, are you trying to ask how do you do xml and php with database?

#8
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts

jwxie518 said:

wait, are you trying to ask how do you do xml and php with database?

No, I asked how the XML pages that is interpreted as HTML are built up to be shown properly, as standard XML normally will just show up the file.

Xav gave the answer, there is some kind of an layout DTD for XML that provides HTML in a modified way, with a special layout "language"
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall