Split Connector Error: "Can't write content text here".

  • 12 March 2024
  • 2 replies

Userlevel 5
Badge +1

I am creating an XML message using a Script connector:

<arc:set attr="output.filename" value="xmltriggerfile_[guid()].xml" />
<arc:set attr="output.filepath" value="[filepath]" />
<arc:set attr=""><?xml version="1.0" encoding="UTF-8"?>
<startDateTime>[_|now()|dateadd('day',-1, 'yyyy-MM-dd 00:00:00')]</startDateTime>
<endDateTime>[_|now()|dateadd('day',-1, 'yyyy-MM-dd 23:59:59')]</endDateTime>

<arc:push item="output" />


This is then fed into a MySQL Lookup Connector which results in the following message


<startDateTime>2024-03-11 00:00:00</startDateTime>
<endDateTime>2024-03-11 23:59:59</endDateTime>
>Item received at inbound office of exchange</e_carrier_message>
<c_carrier_name>Jersey Post</c_carrier_name>
>United States Postal Service facility, ISC NEW YORK NY (USPS), US</e_location>
<h_name>Internal movement within carrier network</h_name>
<h_message>Item received at inbound office of exchange</h_message>



But my Split Connector throws an error: [xmltriggerfile_22297792350344c8a4a633c3eb4b297f.xml] Can't write content text here.”

Here’s my path




So not sure what this error means.


I’ve tried deleting the Split connector and creating it again. I’ve tried in a completely different workflow on our separate Test Instance of Arc. Same issue.


Could it be the way the original message has been created using a Script connector?


Best answer by James B 12 March 2024, 14:47

View original

2 replies

Userlevel 6

What you are seeing here is a recently discovered bug in the Split connector that will be addressed in the near future in an upcoming update for the software. 


The Split connector here is encountering an error when the input XML file has some extra leading or trailing whitespace outside of the root Schedule tag (really hard to spot in the input file). As an immediate solution, please create a Script connector that immediately precedes the Split connector, and drop in this code:


<arc:set attr="file.file" value="[filepath]" />
<arc:set attr="">
<arc:call op="fileRead" item="file">[file.file:data | trim]</arc:call>
<arc:push item="output" />


Like so:



And requeue your XML from the TrimWhitespace step - if you do this, do you see the Split work as expected?

Userlevel 5
Badge +1

Thanks James, that worked!


For reference: the version is  23.4.8789.0