par
piotrowski-s » 02 août 2012, 15:45
Bonjour à toutes et à tous, j'ai un soucis en fait avec un fichier xml, j'essai d'extraire ses informations afin de les exploiter, j'ai donc le code ci dessous:
<?php
$chaineXML= 'tmp/'.$_GET['n_doss'].'.xml';
$dom = new DomDocument();
$dom->loadXML($chaineXML);
$dom->validate();
?>
mais j'ai deux messages d'erreurs:
) Warning: DOMDocument::loadXML() [domdocument.loadxml]: Start tag expected, '<' not found in Entity, line: 1 in C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php on line 27
Call Stack
# Time Memory Function Location
1 0.0027 534032 {main}( ) ..\creance.php:0
2 0.0095 617544 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\left.php' ) ..\creance.php:273
3 0.0267 636520 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php' ) ..\left.php:284
4 6.9264 778704 DOMDocument->loadXML( ) ..\creditsafe.php:27
( ! ) Warning: DOMDocument::validate() [domdocument.validate]: no DTD found! in C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php on line 28
Call Stack
# Time Memory Function Location
1 0.0027 534032 {main}( ) ..\creance.php:0
2 0.0095 617544 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\left.php' ) ..\creance.php:273
3 0.0267 636520 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php' ) ..\left.php:284
4 6.9268 778976 DOMDocument->validate( ) ..\creditsafe.php:28
or j'ai pris toutes les dispositions nécessaires pour que mon fichier soit valide puisqu'il est généré par mon web service.
Je ne sais pas comment résoudre ces erreurs.
Si ca peut aider voici le code xml.
http://www.2shared.com/document/YZWT8rR ... 60012.html
par avance merci pour votre aide.
Bonjour à toutes et à tous, j'ai un soucis en fait avec un fichier xml, j'essai d'extraire ses informations afin de les exploiter, j'ai donc le code ci dessous:
[php]<?php
$chaineXML= 'tmp/'.$_GET['n_doss'].'.xml';
$dom = new DomDocument();
$dom->loadXML($chaineXML);
$dom->validate();
?>[/php]
mais j'ai deux messages d'erreurs:
[quote]) Warning: DOMDocument::loadXML() [domdocument.loadxml]: Start tag expected, '<' not found in Entity, line: 1 in C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php on line 27
Call Stack
# Time Memory Function Location
1 0.0027 534032 {main}( ) ..\creance.php:0
2 0.0095 617544 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\left.php' ) ..\creance.php:273
3 0.0267 636520 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php' ) ..\left.php:284
4 6.9264 778704 DOMDocument->loadXML( ) ..\creditsafe.php:27
( ! ) Warning: DOMDocument::validate() [domdocument.validate]: no DTD found! in C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php on line 28
Call Stack
# Time Memory Function Location
1 0.0027 534032 {main}( ) ..\creance.php:0
2 0.0095 617544 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\left.php' ) ..\creance.php:273
3 0.0267 636520 include( 'C:\wamp\www\NEOGETCASH\GESTIONNAIRE\DOSSIERS\creditsafe.php' ) ..\left.php:284
4 6.9268 778976 DOMDocument->validate( ) ..\creditsafe.php:28
[/quote]
or j'ai pris toutes les dispositions nécessaires pour que mon fichier soit valide puisqu'il est généré par mon web service.
Je ne sais pas comment résoudre ces erreurs.
Si ca peut aider voici le code xml.
http://www.2shared.com/document/YZWT8rRE/120015660012.html
par avance merci pour votre aide.