Skip to main content
Solved

XMLTemplater issue - missing comma "," between expressions

  • September 17, 2024
  • 5 replies
  • 61 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.

 

 

 

View original
Did this help you find an answer to your question?

5 replies

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

Remove the comma’s, I would think:

 


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

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+16
  • 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

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings