function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dhaval PanchalDhaval Panchal 

Urgent :: Error in Bulk API (InvalidBatch : Failed to parse XML. Found invalid XML. entity reference names can not start with character ' ' )

Hello,

I am using Bulk Api with C#.net.
every time I am getting below error if xml file has more than 50 records.

<stateMessage>InvalidBatch : Failed to parse XML. Found invalid XML. entity reference names can not start with character ' ' (position: START_TAG seen ...&lt;SMS_Zip_Code_Map_EUC__c>J &amp; ... @1:72405)</stateMessage>

Below 50 records It works fine.

Anyone has some idea?

Thanks in Advance,
Dhaval Panchal
Satish_SFDCSatish_SFDC
Can you post the complete xml file for records above 50. How is the XML file generated?

Regards,
Satish Kumar
Dhaval PanchalDhaval Panchal
Thanks Satish,

I got solution for this error.
Actually there was some unsupported characters (for xml).
&, < and >
I have replaced these charecters with belos
"&" with "&amp;"
"<" with "&gt;"
and
">" with "&lt;"

and it works fine.

Thanks for your reply.

Thanks,
Dhaval