Re: XML parsing help in FTL

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Tuesday, June 29, 2010, 3:05:06 PM, AjithAD wrote:

>
> Hi,
> I am trying to parse a xml to get value from it. Here is the xml format.
> I was trying to get the Country code from it. I tried with varies options of
> FTL , but none of them is not working.
> Actual issue is with xml-fragment .
> can anyone help me on this ?

If the problem is that an FTL expression like doc.xml-fragment doesn't
work, then that's because the "-" means subtraction in FTL. So you
have to write doc["xml-fragment"].

> <xml-fragment xmlns:ser="http://service.demo/">
>   <ser:HeaderInformation>
>     <ser:Number>372156943</ser:DunsNumber>
>     <ser:Code>EN</ser:LanguageCode>
>     <ser:CountryCode>UK</ser:CountryCode>
>   </ser:HeaderInformation>
>   <ser:BusinessNameDetails>
>     <ser:PrimaryName>Ajith</ser:PrimaryName>
>     <ser:RegisteredName>AD.</ser:RegisteredName>
>     <ser:TradingName>AD</ser:TradingName>
>   </ser:BusinessNameDetails>
> </xml-fragment>
>

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
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.