[Catalyst] XPath, DOM problem
Mesdaq, Ali
amesdaq at websense.com
Wed Jul 9 21:58:38 BST 2008
I agree. Using XML::LibXML and the built in xpath queries would be a much better option. Also you probably definitely want to just pass a data structure to your template that is better suited for processing i.e. plain array or array of hash of name value pairs. Another option if your xml is structured a certain way you can just use xslt to transform the xml into the html or whatever you need and bypass processing it to process it again for display.
Thanks,
------------------------------------------
Ali Mesdaq (CISSP, GIAC-GREM)
Security Researcher II
Websense Security Labs
http://www.WebsenseSecurityLabs.com
------------------------------------------
-----Original Message-----
From: Jonathan Rockway [mailto:jon at jrock.us]
Sent: Tuesday, July 08, 2008 2:04 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] XPath, DOM problem
* On Tue, Jul 08 2008, Herr Verdieck Götz wrote:
> Hi,
>
> I try to generate a site content menu from a xml file.
>
> In my TT file I have the following syntax:
> [%
> # USE prod_tree = XML.Simple('config/xml/hele_de_tree.xml'); # OK this works
>
>
> USE xpath = XML.XPath('config/xml/hele_de_tree.xml'); # ERROR
> #USE dom = XML.DOM;
> #prod_tree = dom.parse('config/xml/sitemap.xml'); # ERROR
>
> -%]
BTW, XML::LibXML is a much nicer library for doing anything related to
XML in Perl. Using anything else is slightly crazy ;)
Regards,
Jonathan Rockway
--
print just => another => perl => hacker => if $,=$"
_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
Protected by Websense Messaging Security -- www.websense.com
More information about the Catalyst
mailing list