Go back to the main page

Encoding a QuickBooks QBXML Request

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul



In short: QBSDK doesn't like non ASCII characters

Are you receiving a QuickBooks found an error when parsing the provided XML text stream and are not missing required tags, tags are in the exact order, tags are all closed, and XML attributes are properly escaped? Then you probably have a non-ASCII character in your request.

This encoding is built-in to my to_qbxml gem but if you are using just using Nokogiri you can simply use .to_xml(encoding: 'US-ASCII') to get the proper encoding. If you aren't using Ruby you can use a standard HTML entities library with decimal encoding to get special characters into QuickBooks via the SDK.

Comment on this article?

New! Get the book!

Sign up for the QuickBooks Integration Roadmapping Call!

Don't know where to start on a QuickBooks Integration. I'll get you on solid ground, fast!