Welcome Guest, Not a member yet? Register   Sign In
MVC, XUL
#1

[eluser]Unknown[/eluser]
Using MVC techniques, i can model my database io, control it, and view it in XHTML
The CI shows an error on the xml declaration <?xml version "1.0"?>.
So far so good, XHTML does not need the XML declaration to show the page correctly.
The way it works looks good, the amount of code is limited, nice in mine opinion.

Instead of XHTML i want to output to XUL
XUL needs the XML declaration and the processing instructions <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>.
CI shows error on both.

I was a little bit surprised, i thought that the hole id behind MVC is, that we can show the same data in different scopes.

Is there a solution for this problem?
#2

[eluser]Alex007[/eluser]
it's not a CI problem, it's a PHP problem, because XML starts with <? and PHP too, it confuses the PHP parser.

Instead, do this:

Code:
<?php
  echo '<?xml ...(stuff here)...>';
?>

Since the <? tag isn'T part of the file, but is outputted *BY* PHP, it won't confuse the parser.




Theme © iAndrew 2016 - Forum software by © MyBB