Freemarker. How to work with xml with names of nodes with colons?

xml:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <Name>Test</Name> </S:Envelope> 

field in model:

 «${doc["item["S:Envelope"]/ Name"]}» 

Mistake:

 fr.opensagres.xdocreport.core.XDocReportException: freemarker.core.NonStringOrTemplateOutputException: For "${...}" content: Expected a string or something automatically convertible to string (number, date or boolean), or "template output" , but this has evaluated to a sequence+hash (wrapper: fedom.NodeListModel): ==> doc.item["S:Envelope"].item["xmlns:S"] [in template "fr.opensagres.xdocreport.document.docx.DocxReport@3fa77460!word/document.xml" at line 4, column 1487] ---- Tip: This XML query result can't be used as string because for that it had to contain exactly 1 XML node, but it contains 0 nodes. That is, the constructing XML query has found no matches. ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${doc.item["S:Envelope"].item["xmlns:... [in template "fr.opensagres.xdocreport.document.docx.DocxReport@3fa77460!word/document.xml" at line 4, column 1485] ---- at fr.opensagres.xdocreport.template.freemarker.FreemarkerTemplateEngine.process(FreemarkerTemplateEngine.java:167) at fr.opensagres.xdocreport.template.freemarker.FreemarkerTemplateEngine.processWithCache(FreemarkerTemplateEngine.java:112) at fr.opensagres.xdocreport.template.AbstractTemplateEngine.process(AbstractTemplateEngine.java:112) at fr.opensagres.xdocreport.template.AbstractTemplateEngine.process(AbstractTemplateEngine.java:83) at fr.opensagres.xdocreport.document.AbstractXDocReport.processTemplateEngine(AbstractXDocReport.java:775) at fr.opensagres.xdocreport.document.AbstractXDocReport.process(AbstractXDocReport.java:521) at fr.opensagres.xdocreport.document.AbstractXDocReport.process(AbstractXDocReport.java:487) at Main.main(Main.java:32) Caused by: freemarker.core.NonStringOrTemplateOutputException: For "${...}" content: Expected a string or something automatically convertible to string (number, date or boolean), or "template output" , but this has evaluated to a sequence+hash (wrapper: fedom.NodeListModel): ==> doc.item["S:Envelope"].item["xmlns:S"] [in template "fr.opensagres.xdocreport.document.docx.DocxReport@3fa77460!word/document.xml" at line 4, column 1487] ---- Tip: This XML query result can't be used as string because for that it had to contain exactly 1 XML node, but it contains 0 nodes. That is, the constructing XML query has found no matches. ---- 
  • Column nodes contain a namespace prefix. XML namespaces - Alexander Petrov
  • did not help <#ftl ns_prefixes = {"S": " schemas.xmlsoap.org/soap/envelope "}> - Dmitry
  • "$ {Doc [" item ["Envelope"] / Name "]}" - Dmitry
  • You have defined the prefix in the first line, but do not use it in the second. - Alexander Petrov
  • one
    http://schemas.xmlsoap.org/soap/envelope/ ! = schemas.xmlsoap.org/soap/envelope - Alexander Petrov

0