View Single Post
  #1 (permalink)  
Old June 7th, 2012, 12:13 PM
skipw skipw is offline
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: Newark, DE, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML documents with namespaces

I am trying to work with an XML document with namespace declarations

In testing my PHP code I am getting the error message: "URI UBLCatalogDocument is not absolute"

Can someone help?

Thanks - Skip

Code:
 
<?php 
$doc = new DOMDocument(); 
$doc->load( 'UBLCatalog.xml' ); 
$Items = $doc->getElementsByTagNameNS( "UBLCommonAggregateComponents","Item" ); 
foreach( $Items as $Item ) 
{ 
  $descriptions = $Item->getElementsByTagNameNS( "UBLCommonBasicComponents","Description" ); 
  $description = $descriptions->item(0)->nodeValue; 
   
   
   
  echo "<b>$description\n</b><br>"; 
  } 
?>