I'm running into some sort of xml error when trying to do a xml request to quickbooks. I created the xml using XDocument
in C#, I'm wondering if it is being encoded incorrectly?
Error Msg:
Line: 1 LinePos: 1 Src Text:  Reason: Invalid at the top level of the document.
Here is the start of the xml file
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
Here is how I created the xml declaration in C#
XmlDocument POx = new XmlDocument();
XmlDeclaration xmldeclaration = POx.CreateXmlDeclaration("1.0", "UTF-8", null );
XmlElement root = POx.DocumentElement;
POx.InsertBefore(xmldeclaration, root);