Avatar of galic1987
galic1987

asked on 

PHP - XML how to join 2 xml objects inside php?

PHP - XML how to join 2 xml objects inside php?

the code is below... with $data->get_data() i got one dom object but i get always error:

<b>Fatal error</b>:  Uncaught exception 'DOMException' with message 'Wrong Document Error'



// code
$dom = new DOMDocument("1.0","UTF-8");
$dom->formatOutput = true;
$package = $dom->appendChild($dom->createElement("package"));
$package->setAttribute('date',date('r'));
$package->appendChild($data->get_data());

Open in new window

Web ComponentsPHP

Avatar of undefined
Last Comment
galic1987
Avatar of galic1987
galic1987

ASKER

$data->get_data() is type of DOMDocument("1.0","UTF-8") only to know,,, :)
ASKER CERTIFIED SOLUTION
Avatar of galic1987
galic1987

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo