Save Time with this QuickBooks API Debugging Tip

Tip: If you’re working with the QuickBooks API and QuickBooks returns an error message like this:
QuickBooks found an error when parsing the provided XML text stream.

The first thing to think about (assuming your XML generally looks valid) is the ordering of your elements. The XML schema requires all of the XML elements be in a specific order. You can view the order in the OnScreen Reference.

In general to get more information about a XML error, start up your qb* XML Validator tool (should be installed with SDK) and put in your XML file. Here’s the error I got from having an out of order element:
Reason: Element content is invalid according to the DTD/Schema.
Expecting: ServiceDate, SalesTaxCodeRef, IsTaxable, OverrideItemAccountRef.

Comments are closed.