Skip to main content
Solved

XMLTemplater issue - missing comma "," between expressions

  • September 17, 2024
  • 5 replies
  • 90 views

eric_armitage
Contributor
Forum|alt.badge.img+10

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?

Best answer by eric_armitage

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.

 

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

s.jager
Influencer
Forum|alt.badge.img+22
  • Influencer
  • September 17, 2024

Remove the comma’s, I would think:

 


eric_armitage
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • September 17, 2024

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. 

 

 


s.jager
Influencer
Forum|alt.badge.img+22
  • Influencer
  • September 18, 2024

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.


eric_armitage
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • Best Answer
  • September 19, 2024

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.

 

 

 


eric_armitage
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • September 19, 2024

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

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