Yes it is possible, the attributes are the same as if you had a child element of the same name. For example:
<mydata>
Is the same as if you did:
<mydata>
Hope that helps,
Tom
Hi all,
I want to use Zend_Config_Xml feature of ZF to automate my system. I am curious to know whether Zend_Config_Xml is able to read custom attributes of any xml file. If so, can someone please let me know how can this be achieved?
My xml file would look something like this:
<?xml version="1.0"?>
<mydata>
<items type="clothes">
<item belongs_to="cat1">
<name>ABCD</name>
</item>
<item belongs_to="cat3">
<name>EFGH</name>
</item>
</items>
<items type="shoes">
<item belongs_to="cat5">
<name>PQRS</name>
</item>
<item belongs_to="cat3">
<name>XYZ</name>
</item>
</items>
</mydata>
Now suppose I want to access data under this node(<items type="shoes">), then how should I do this using the Zend_Config_Xml object.
Can someone please help me in this? Any help would be greatly appreciated.
Regards,
Vibhor
没有评论:
发表评论