Answer the question
In order to leave comments, you need to log in
How to parse xml using FTL?
There is an xml like this:
<ns1:vehicles modelId="201">
<ns3:modelName>Acura CL</ns3:modelName>
</ns1:vehicles>
<ns1:vehicles modelId="202">
<ns3:modelName>Acura EL</ns3:modelName>
</ns1:vehicles>
<ns1:vehicles modelId="203">
<ns3:modelName>Acura Integra</ns3:modelName>
</ns1:vehicles>
<#ftl ns_prefixes={
"ns1":"http://smev.gosuslugi.ru/rev120315",
"ns3"="urn://x-artefacts-it-ru/dob/poltava/inquiry-smev33/req-resp/1.0"
}/>
<#assign MAS = xml["//ns1:vehicles"]/>
<listRefItems>
<error>
<code>0</code>
<message>operation completed</message>
</error>
<total>${MAS?size}</total>
<items>
<title>${itm["ns3:modelName"]?xml}</title>
<isLeaf>true</isLeaf>
</items>
</#list>
</listRefItems>
<ns1:vehicles>
<ns3:modelName>Acura CL</ns3:modelName>
</ns1:vehicles>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question