PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Does a package like this exist
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Does a package like this exist

Réponse
 
LinkBack Outils de la discussion
Vieux 04/01/2008, 17h33   #1
Christoph Boget
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Does a package like this exist

Not wanting to re-invent the wheel, I'm wondering if there is a package out
there that can read in an HTML file and allow you to manipulate and dissect
it much like you can in javascript? For example, functionality similar to
(though, not necessarily the same as) getElementById(), .innerHTML, etc.

I need to write a conversion script that reorganizes the contents of a large
number of HTML files and I'm hoping that there is something out there that
might make this task a bit easier. I've done some searching on Google but
didn't really find anything. I'm hoping that someone might be able to point
me to something I might have missed.

thnx,
Christoph

  Réponse avec citation
Vieux 04/01/2008, 17h52   #2
listmail@websage.ca
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Does a package like this exist

On Fri, 4 Jan 2008 12:33:11 -0500
"Christoph Boget" <christoph.boget@gmail.com> wrote:

> Not wanting to re-invent the wheel, I'm wondering if there is a
> package out there that can read in an HTML file and allow you to
> manipulate and dissect it much like you can in javascript? For
> example, functionality similar to (though, not necessarily the same
> as) getElementById(), .innerHTML, etc.
>
> I need to write a conversion script that reorganizes the contents of
> a large number of HTML files and I'm hoping that there is something
> out there that might make this task a bit easier. I've done some
> searching on Google but didn't really find anything. I'm hoping that
> someone might be able to point me to something I might have missed.
>
> thnx,
> Christoph


Hi,

Seems like you might want to look at the DOM extension and friends.

Start here:

http://www.php.net/manual/en/ref.dom.php
http://www.php.net/manual/en/ref.simplexml.php
http://www.php.net/manual/en/ref.xml.php

HTH,
GM

--

Greg Maruszeczka

http://websage.ca
skype: websage.ca
googletalk: gmarus
  Réponse avec citation
Vieux 04/01/2008, 17h53   #3
Brady Mitchell
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Does a package like this exist

On Jan 4, 2008 9:33 AM, Christoph Boget <christoph.boget@gmail.com> wrote:
> Not wanting to re-invent the wheel, I'm wondering if there is a package out
> there that can read in an HTML file and allow you to manipulate and dissect
> it much like you can in javascript? For example, functionality similar to
> (though, not necessarily the same as) getElementById(), .innerHTML, etc.


Hopefully you're using PHP5:

http://php.net/dom to interact with the DOM

http://php.net/tidy to cleanup the HTML if needed

If you're on PHP4:

http://php.net/domxml

Brady
  Réponse avec citation
Vieux 04/01/2008, 17h54   #4
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Does a package like this exist

On Jan 4, 12:33 pm, christoph.bo...@gmail.com ("Christoph Boget")
wrote:
> Not wanting to re-invent the wheel, I'm wondering if there is a package out
> there that can read in an HTML file and allow you to manipulate and dissect
> it much like you can in javascript? For example, functionality similar to
> (though, not necessarily the same as) getElementById(), .innerHTML, etc.
>
> I need to write a conversion script that reorganizes the contents of a large
> number of HTML files and I'm hoping that there is something out there that
> might make this task a bit easier. I've done some searching on Google but
> didn't really find anything. I'm hoping that someone might be able to point
> me to something I might have missed.
>
> thnx,
> Christoph


<http://www.php.net/dom>
  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 11h37.


É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,14073 seconds with 12 queries