Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Include Elements from other namespace in own XML

From: Pavel Lepin <p.lepin@-------.--->
To: 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;


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent