Completely new to using simple XML library in PHP, and have been using the w3 xpath syntax for assistance.
I have an xml file that looks roughly like this:
<Xml_Configs>
<Foo_Module>
<Front_Name>a</Front_Name>
</Foo_Module>
<Bar_Module>
<Front_Name>b</Front_Name>
</Bar_Module>
<Baz_Module>
<Front_Name>c</Front_Name>
</Baz_Module>
</Xml_Configs>
I'm trying to figure out which module has the Front_Name of b. Right now I've only been trying to get just the attribute to match, not caring about getting the parent, and here's what I've tried:
$xmlObj->xpath('/Xml_Configs/*[@Front_Name="b"]');
That gets me nothing, however: "/Xml_Configs/*/Front_Name" does give me an array of simple xml objects with a, b, and c. And "/Xml_Configs/*/[@Front_Name="b"]" gives me invalid expression errors.
Any help you can give is appreciated, thanks!