Article View: fr.comp.text.xml
Article #9025Re: post en xml... HELP plz
From: Thomas Broyer
Date: Mon, 25 Jun 2001 16:06
Date: Mon, 25 Jun 2001 16:06
47 lines
2574 bytes
2574 bytes
In <9h7ik3$f8g$1@reader1.imaginet.fr>, Billy bathgate wrote:
> // $xml je fous dans ma var xml mon code
>
> $xml="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
[...]
> ?>
>
> // puis je mets ma var dans le hidden que je veux submiter
<hors-sujet>
En fran�ais dans le texte, �a donnerai plut�t :
...dans le champ cach� que je veux envoyer (ou "soumettre")
</hors-sujet>
> <input type=hidden name=xml value="<?echo $xml; ?>">
Ce qui nous donne donc en "sortie" :
<input type=hidden name=xml value="<?xml version="1.0"...">
Y a pas comme un bug avec les " l� ?
Passe un coup de htmlspecialchars sur ta variable $xml, ou au moins un
$xml = str_replace ('"', '"', $xml) ;
> // et pis j'envoie le tout
> <script>
> this.document.lookup.action = 'adresse de ma page';
> this.document.lookup.submit();
> </script>
<hors-sujet>
1. ton script PHP ne pouvait pas faire directement le POST et en renvoyer
le r�sultat ? Y a des clases d�j� existantes pour �a (voir sur devshed par
exemple)
2. JavaScript sucks! pour des trucs comme �a (sauf si bien s�r c'est pour
un usage strictement personnel ou sur intranet, bref avec un certain
contr�le des configurations clientes)
</hors-sujet>
Au fait, �a ressemble � du XML-RPC ou quelque chose d'�quivalent ; l� aussi
il existe d�j� des classes PHP. Moi je dis �a, c'est juste pour t'�viter de
r�inventer la roue carr�e...
suivi sur fr.comp.infosystemes.www.auteurs.php puisque finalement �a n'a
rien � voir avec XML.
Tom.
Technical Details
Message-ID:
<9226157.Emhk5qWAgF@ltgt.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp4.proxad.net.POSTED!not-for-mailReferences:
<9h7ik3$f8g$1@reader1.imaginet.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,4d8ba3a8e5ba1552 X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-06-25 09:06:12 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp4.proxad.net.POSTED!not-for-mail Message-ID: <9226157.Emhk5qWAgF@ltgt.net> From: Thomas Broyer <ptittom+news@free.fr> Subject: Re: post en xml... HELP plz Newsgroups: fr.comp.text.xml Followup-To: fr.comp.infosystemes.www.auteurs.php References: <9h7ik3$f8g$1@reader1.imaginet.fr> Lines: 47 Organization: </> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit Date: Mon, 25 Jun 2001 16:06:11 GMT NNTP-Posting-Host: 193.252.183.128 X-Complaints-To: abuse@proxad.net X-Trace: nnrp4.proxad.net 993485171 193.252.183.128 (Mon, 25 Jun 2001 18:06:11 CEST) NNTP-Posting-Date: Mon, 25 Jun 2001 18:06:11 CEST