I wan to insert this line of code:
xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>"
to this line of code:
<html xmlns="http://www.w3.org/1999/xhtml">
so the output is like this:
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
I'm using this: Simple DOM Parser
when use this:
$html->find('html', 0)->outertext = '<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" > ';
The whole HTML file will be lost and will be replaced by the code above. It's getting all the outertext of HTML. But I just want to change the line of HTML code.
outertextwhich (probably) includes the dom-objects contents as well.:in there AFAIK. Did you consider not using the lib (for this)? Would that be an option?