lecture fichier XML

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : lecture fichier XML

Re: lecture fichier XML

par jeanmi » 04 juin 2010, 15:24

Avant :
<?xml version="1.0" encoding="UTF-8" ?>

<Articles width="700" height="500" gap="10" gap_comments="5" width_comment="450" password="password" color_admin="0x999999" color_user="0x454545">
<post day="20" month="February" title="Large post" description="second_post.html" small_description="test">
<comment text="Great post, I really agree with everything you said" date="14 JAN" user="Jack" />
<comment text="Thanks a lot Jack." date="14 JAN" user="Admin" />
<comment text="Excellent post" date="15 JAN" user="Viviane" />
<comment text="This blog is awesome" date="15 JAN" user="Jack" />
<comment text="This was just what I was looking for, thanks ;)" date="15 JAN" user="Michael" />
<comment text="I'm glad you all liked it :)" date="15 JAN" user="Admin" />
<comment text="The post is brilliant and excellent blog. Flash definetly isn't dead " date="15 JAN" user="John" />
</post>
<post day="13" month="February" title="Admin Panel" description="third_post.html" small_description="Everything can be changed in the admin pannel, that comes along with this file, extremely easy to use.">
<comment text="Check out the admin panel as well. Everything can be changed from there." date="15 JAN" user="Visual" />
<comment text="This blog doesn't need xml or as3 knowledge of any kind.&#xD;&#xD;Comments can be of any size and curved corners will maintain their aspect." date="15 JAN" user="Works" />
</post>
<post day="24" month="January" title="What a great title" description="first_post.html" small_description="Sed fermentum lacula. Prae; Sed ac quis, ultricies nibh. Classa. Loreet ultrisus. Donec, blandisse vestibus a, sed, lor id nibh, sus, commodo vulputate sem id, volutpat leo. Cras ut eger varius ">
<comment text="Hope you like this blog, I'll make an even better version if the sales goes well " date="15 JAN" user="Admin" />
</post>
<post day="12" month="January" title="My first post" description="second_post.html" small_description="This is my first post here. Hope you like it and keep checking by for updates. Suspendisse pede dui quis, viverra, bibend.">
<comment text="Great first Post" date="15 JAN" user="Gil" />
<comment text="This is great, congrats" date="15 JAN" user="Marie" />
<comment text="Thanks :)" date="15 JAN" user="Admin" />
</post>
</Articles>

Après :
<?xml version="1.0" encoding="UTF-8" ?>

<Articles width="700" height="500" gap="10" gap_comments="5" width_comment="450" password="password" color_admin="0x999999" color_user="0x454545">
<post day="16" month="June" title="ANNIV" description="jde_post.html" small_description="C'est mon anniv" />
<post day="20" month="February" title="Large post" description="second_post.html" small_description="test">
<comment text="Great post, I really agree with everything you said" date="14 JAN" user="Jack" />
<comment text="Thanks a lot Jack." date="14 JAN" user="Admin" />
<comment text="Excellent post" date="15 JAN" user="Viviane" />
<comment text="This blog is awesome" date="15 JAN" user="Jack" />
<comment text="This was just what I was looking for, thanks ;)" date="15 JAN" user="Michael" />
<comment text="I'm glad you all liked it :)" date="15 JAN" user="Admin" />
<comment text="The post is brilliant and excellent blog. Flash definetly isn't dead " date="15 JAN" user="John" />
</post>
<post day="13" month="February" title="Admin Panel" description="third_post.html" small_description="Everything can be changed in the admin pannel, that comes along with this file, extremely easy to use.">
<comment text="Check out the admin panel as well. Everything can be changed from there." date="15 JAN" user="Visual" />
<comment text="This blog doesn't need xml or as3 knowledge of any kind.&#xD;&#xD;Comments can be of any size and curved corners will maintain their aspect." date="15 JAN" user="Works" />
</post>
<post day="24" month="January" title="What a great title" description="first_post.html" small_description="Sed fermentum lacula. Prae; Sed ac quis, ultricies nibh. Classa. Loreet ultrisus. Donec, blandisse vestibus a, sed, lor id nibh, sus, commodo vulputate sem id, volutpat leo. Cras ut eger varius ">
<comment text="Hope you like this blog, I'll make an even better version if the sales goes well " date="15 JAN" user="Admin" />
</post>
<post day="12" month="January" title="My first post" description="second_post.html" small_description="This is my first post here. Hope you like it and keep checking by for updates. Suspendisse pede dui quis, viverra, bibend.">
<comment text="Great first Post" date="15 JAN" user="Gil" />
<comment text="This is great, congrats" date="15 JAN" user="Marie" />
<comment text="Thanks :)" date="15 JAN" user="Admin" />
</post>
</Articles>

Re: lecture fichier XML

par stopher » 04 juin 2010, 14:27

Salut

Quelle est le contenu de ton fichier avant et apres la modif ?

Ch.

lecture fichier XML

par jeanmi » 04 juin 2010, 14:25

J'ai un souci avec la lecture d'un fichier XML. Je m'explique, j'ai un fichier XML existant que j'arrive à lire avec mon serveur apache en local (sur mon poste window via une page HTML). Sur mon serveur d'hébergement qui lui est en linux j'arrive à le lire aussi (avec la même page html). Ensuite je fais une modif sur mon fichier XML et je l'enregistre avec la commande php save("blog.xml"). Après cette commande save faire sur mon serveur d'hébergement linux mon fichier blog.xml n'est plus lisible alors que si je fais la même manip sur mon serveur en local tout est ok. Pourriez vous m'aider SVP ? :idea: