The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
How to read field from XML config file - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11) +--- Thread: How to read field from XML config file (/showthread.php?tid=7132) |
How to read field from XML config file - morvy - 2015-03-10 Hi, I want to create a component for sidebar to list categories, that I've created in i18n Special Pages, and I would like to read it from one location, because number of categories can change in future so I want to maintain it in one place. Is it possible to read this information with some function already present in GS ? In XML, it's like this: Code: <item> Thank you for any suggestions RE: How to read field from XML config file - shawn_a - 2015-03-10 getXML($file) make sure your xml has a header <?xml version="1.0" encoding="UTF-8"?> RE: How to read field from XML config file - morvy - 2015-03-11 eheh, that was easy if somebody would be interested in future, here's an example: (hardware is special page type, item[3] is the field with category custom field) PHP Code: $file = getXml(GSDATAOTHERPATH."/i18n_special_hardware.xml"); RE: How to read field from XML config file - shawn_a - 2015-03-11 you can also use xpath for this |