Jump to content

[SOLVED] I have a problem with getElementById, its returning nothing...why ?


jd2007

Recommended Posts

php code :

 

<?php

$doc = new DomDocument;

// We need to validate our document before refering to the id
$doc->validateOnParse = true;
$doc->Load('xml.php');

echo $doc->getElementById('477b0f0cdd410')->tagName . "\n";
?>

 

this is xml.php:

 

<?xml version="1.0" encoding="windows-1250"?>
<sos><cat id3="477b0f0cdd410"/></sos>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.