MrProper
MrProper

Reputation: 1580

Viewing Xml as Html

I have XML file and I am applying XSLT stylesheet on it + CSS. I can see all XSLT changes applied to XML file when reading XML file in browser. However when I try to inspect code it shows data in XML, but I want HTML code.

Am I missing something?

Upvotes: 0

Views: 124

Answers (1)

jasso
jasso

Reputation: 13986

When a browser does an XSL transformation it takes the input XML and the XSLT stylesheet that is linked to your XML document. Because the result of the transform is displayed directly in the browser, the browser doesn't need to output a serialization of the result document.

The result of the transformation is only a tree (a document model). Therefore you see only your original XML file when you try to inspect the result with "view source" because that is the real source document that the browser receives from the server.

Upvotes: 1

Related Questions