Re: Parse XML String

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Friday, July 20, 2012, 7:33:56 PM, Guntu, Ashok (IS) (Contr) wrote:

> Hi,
>   I have access to a variable in my template.  The variable is of
> type String and contains xml in it.  How am I supposed to parse it.

You are supposed to parse it before you put it into the data-model. If
that's not feasible, you can still write a TemplateMethodModelEx
implementation that parses a string as XML and then "?new" it into
some app-specific #import-ed/#included library.

> If anybody could point me in the right direction that would be great.
>  
> All the examples I am looking at point to reading an xml document and parsing it.
>  
> Thanks
> Ashok

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.