note 98332 deleted from libxml.constants by danbrown

From: Date: Wed, 09 Jun 2010 16:26:24 +0000
Subject: note 98332 deleted from libxml.constants by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-169985@lists.php.net to get a copy of this message
Note Submitter: Nuno Gato ---- I'm with some problems with this. I have a file like this: <?xml version="1.0"?> <products> <product id="1"> <name>Product1</name> <sku>SKU1</sku> <url>h**p://xxxxxxx.cc</url> <price>27.9500</price> <distributorPrice>23.1000</distributorPrice> <quantity>0</quantity> <backorderAllowed>true</backorderAllowed> <RoHS>true</RoHS> <country>Pluto</country> <boxSize>medium</boxSize> <weight>0.1784</weight> <description>Some Description</description> <category id="9">Cat 9</category> <parentCategory id="2">Cat 2</parentCategory> <image> <main>pic1.jpg</main> <thumb>pic1_th.jpg</thumb> <large>pic1_lg.jpg</large> </image> <image> <main>pic2.jpg</main> <thumb>pic2_th.jpg</thumb> <large>pic2_lg.jpg</large> </image> </product> </products> then I do this: $xml = simplexml_load_string($xml); print_r($xml); in the result of this print, I lose the attributes for category and parentCategory the only attribute I have is the product ID As you can imagine this sucks, because I cannot import anything without that categories ID... I'm using: PHP 5.2.9 (cli) (built: Mar 3 2010 10:25:33) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with the ionCube PHP Loader v3.3.10, Copyright (c) 2002-2009, by ionCube Ltd., and with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

« previous php.notes (#169985) next »