Skip to main content

Hi I am trying to use the XMLTemplater with a SUB template. The start of the ROOT expression looks like this (from an existing xml file that it valid)

When I run the workspace I get this message.

 

Does anyone know what the syntax error is and how to correct it?

Remove the comma’s, I would think:

 


Remove the comma’s, I would think:

 

 

Sorry that was the wrong screenshot! The actual xml does not have commas but still gets the “missing comma” error.  This is the actual xml - without commas. 

 

 


Then that makes it a lot more difficult to say what’s wrong, because those screenshots only show part of your configuration. And the error message may be misleading, because the part between the brackets is just a suggestion of what could be wrong - it could just as easily be caused by missing or mismatched quotes, or brackets for example.


Ok i found a solution. If I paste the xml directly into the root template expression it fails. If i create an attribute containing the code and then reference the attribute in the template it works.

 

 

 


Update :  The attribute you create has to be of type xml

And the templater has to use get-xml-attribute - not get-attribute

 


Reply