note 98332 added to libxml.constants

From: Date: Wed, 09 Jun 2010 16:23:13 +0000
Subject: note 98332 added to libxml.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-169984@lists.php.net to get a copy of this message
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 ---- Server IP: 69.147.83.197 Probable Submitter: 85.242.248.183 ---- Manual Page -- http://www.php.net/manual/en/libxml.constants.php Edit -- https://master.php.net/note/edit/98332 Del: integrated -- https://master.php.net/note/delete/98332/integrated Del: useless -- https://master.php.net/note/delete/98332/useless Del: bad code -- https://master.php.net/note/delete/98332/bad+code Del: spam -- https://master.php.net/note/delete/98332/spam Del: non-english -- https://master.php.net/note/delete/98332/non-english Del: in docs -- https://master.php.net/note/delete/98332/in+docs Del: other reasons-- https://master.php.net/note/delete/98332 Reject -- https://master.php.net/note/reject/98332 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#169984) next »