PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > appending a new xml file to another existing xml file
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
appending a new xml file to another existing xml file

Réponse
 
LinkBack Outils de la discussion
Vieux 18/02/2008, 14h30   #1
ofuuzo1@yahoo.no
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut appending a new xml file to another existing xml file

Hei,
I am having issue using DOM to appending a new xml file (new.xml) to
another existing xml file (old.xml) without deleting the existing
items in old.xml. I would like to have the new <items> append at the
end of existing items at the old.xml. How can I do that? I am using
php5

Thanks!
Ofuuzo
  Réponse avec citation
Vieux 18/02/2008, 16h32   #2
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: appending a new xml file to another existing xml file

On Feb 18, 9:30 am, ofuu...@yahoo.no wrote:
> Hei,
> I am having issue using DOM to appending a new xml file (new.xml) to
> another existing xml file (old.xml) without deleting the existing
> items in old.xml. I would like to have the new <items> append at the
> end of existing items at the old.xml. How can I do that? I am using
> php5
>
> Thanks!
> Ofuuzo


Share the code you already have and describe any problems you're
having with it. We'll be able to better you that way.
  Réponse avec citation
Vieux 19/02/2008, 07h55   #3
ofuuzo1@yahoo.no
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: appending a new xml file to another existing xml file

On 18 Feb, 17:32, ZeldorBlat <zeldorb...@gmail.com> wrote:
> On Feb 18, 9:30 am, ofuu...@yahoo.no wrote:
>
> > Hei,
> > I am having issue using DOM to appending a new xml file (new.xml) to
> > another existing xml file (old.xml) without deleting the existing
> > items in old.xml. I would like to have the new <items> append at the
> > end of existing items at the old.xml. How can I do that? I am using
> > php5

>
> > Thanks!
> >Ofuuzo

>
> Share the code you already have and describe any problems you're
> having with it. We'll be able to better you that way.


Here comes the code:

<?php
$xml_old = new DOMDocument();
$xml_old->load('http://wo.uio.no/.....x=frida&set=old');
print $xml_old->save("xmlfile.xml");


$xml_new = new DOMDocument();
$xml_new->load('http://wo.uio.no/...prefix=frida&set=new');
print $xml_new->save("xmlfile.xml");

?>

How can I append xml_new to xmlfile.xml without deleting the existing
data in xmlfile.xml?

Thanks
Ofuuzo
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h57.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07556 seconds with 11 queries