Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Include Elements from other namespace in own XML >Thread Next - Re: Include Elements from other namespace in own XML Re: Include Elements from other namespace in own XMLTo: NULL Date: 7/3/2007 11:59:00 AM
Please don't top-post.
Benjamin Kalytta <bkausbk@w...> wrote in
<f6b55m$6hv$1@o...>:
> Yes, first I tried to use "lax", but the parser just
> ignored the inner xhtml like tags. Ignore means the tags
> was just completely removed. Only textNode was added. It
> shouldn't behavior like that isn't it?
How do you know? Unless you provide a minimal, complete,
runnable example there's no way to tell precisely what your
problem is, but this sure sounds like your problem lies
elsewhere. PHP 5 DOM works just fine.
pavel@debian:~/dev/php/xml$ xmllint test.xml
<?xml version="1.0"?>
<stringtable xmlns:stringtable="http://www.domain.com/ns"
xmlns:html="http://www.w3.org/1999/xhtml" version="1.0"
language="de">
<string id="someid">Text <html:a
href="#">Link</html:a></string>
</stringtable>
pavel@debian:~/dev/php/xml$ cat prs.php
#!/usr/bin/php
<?php
$xml = new DOMDocument ( ) ;
$xml -> load ( 'test.xml' ) ;
$str = $xml -> saveXML ( ) ;
print ( $str ) ;
?>
pavel@debian:~/dev/php/xml$ ./prs.php
<?xml version="1.0"?>
<stringtable xmlns:stringtable="http://www.domain.com/ns"
xmlns:html="http://www.w3.org/1999/xhtml" version="1.0"
language="de">
<string id="someid">Text <html:a
href="#">Link</html:a></string>
</stringtable>
pavel@debian:~/dev/php/xml$ php -v
PHP 5.2.0-10 (cli) (built: Mar 7 2007 22:42:14)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend
Technologies
pavel@debian:~/dev/php/xml$
--
use strict; use warnings; package hacker;
sub of { bless\$_[1],$_[0] }
sub brag{print"Just another ${$_[0]} hacker, \n"}
hacker->of('Perl')->brag;
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
