AnsweredAssumed Answered

Expecting a string, date or number here, Expression ..

Question asked by cirruslogic on Aug 25, 2010
I have an XML file deposited in a <user home> <vendor id> <orders>
I want the user to view the contents presented in various formats.
I created this simple ftl file to test this but I am getting this error.
There is already a value in the element uniqueCreatorIdentification but it seems like it is not reading that value.
Caused by: freemarker.core.NonStringException: Error on line 4, column 11 in workspace://SpacesStore/cb640b3c-37f5-4f54-9347-dcfc8fe72dd9
Expecting a string, date or number here, Expression dom.order.typedEntityIdentification.entityIdentification.uniqueCreatorIdentification is instead a freemarker.ext.dom.NodeListModel
   at freemarker.core.Expression.getStringValue(
   at freemarker.core.Expression.getStringValue(
   at freemarker.core.DollarVariable.accept(
This is my test xml file:
<?xml version="1.0" encoding="UTF-8"?>
<test:order xmlns:test="" xmlns:xsi="" documentStatus="COPY" creationDate="2010-07-24T00:00:00" >
  <typedEntityIdentification entityType="ORDER">
This is my ftl  file:
<#ftl ns_prefixes={"test", ""}>
<#if document.mimetype = "text/xml">
  <#assign dom=document.xmlNodeModel>