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:[EMAIL PROTECTED] 
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@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 
_______________________________________________
List: Catalyst@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/

Reply via email to