XMLHTTP from Microsoft Word to Classic ASP...XML document looses white space

How do I correct my code so that when I send an xml in string over a post that it does not loose the white space in between the attributes

Abbreviated code is as follows
Piece 1:  Word VBA Macro
                       ...
                        strBudgetRows = strBudgetRows & "<Detail BT20OBJ=""BT20.GLKKeyMaster"" Prop=""TitleDl""/>"
                        strBudgetRows = strBudgetRows & "<Detail BT20OBJ=""BT20.GLOObjMaster"" Prop=""ObjDl""/>"
                    strBudgetRows = strBudgetRows & "</ReportFormat>"
                strBudgetRows = strBudgetRows & "</ReportFetch>"
            strBudgetRows = strBudgetRows & "</Request>"
        strBudgetRows = strBudgetRows & "</NetSightMessage>"
    strBudgetRows = strBudgetRows & "</sbixml>"



    Set curlss = CreateObject("Microsoft.XMLHTTP")
    curlss.Open "POST", "https://", False
    curlss.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    curlss.send ("str=" & strBudgetRows)
   
    'curlss.responseText comes back with no spaces between attributes
    ActiveDocument.Tables(3).Cell(1, 1).Range.Text = curlss.responseText
   


Piece 2: Classic asp code
      dim strBudgetRows
      strBudgetRows = request("str")

      set xmlBudgetRows = Server.CreateObject("Microsoft.XMLDOM") : xmlBudgetRows.async = false : xmlBudgetRows.loadXml strBudgetRows
        response.write strBudgetRows
       
Piece 3:  XML is consumed in Piece 2 but the white space is gone, thus the .loadxml fails
<sbixml><NetSightMessage><Header><Connection>bplus</Connection><UserID>BSI</UserID><CurrentLedgersGL="GL"JL="JL"/><Mask>POUPPR</Mask><SubSystem>Purchasing</SubSystem><TraceEna
maxdbaseAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zc2Commented:
Why are you sending the XML as a parameter of  "application/x-www-form-urlencoded" format, not as "text/xml" ?
strBudgetRows = strBudgetRows & "<Detail BT20OBJ='BT20.GLKKeyMaster' Prop='TitleDl'/>"
                        strBudgetRows = strBudgetRows & "<Detail BT20OBJ='BT20.GLOObjMaster' Prop='ObjDl'/>"
                    strBudgetRows = strBudgetRows & "</ReportFormat>"
                strBudgetRows = strBudgetRows & "</ReportFetch>"
            strBudgetRows = strBudgetRows & "</Request>"
        strBudgetRows = strBudgetRows & "</NetSightMessage>"
    strBudgetRows = strBudgetRows & "</sbixml>"

    Set curlss = CreateObject("Microsoft.XMLHTTP")
    curlss.Open "POST", "https://", False
    curlss.setRequestHeader "Content-Type", "text/xml"
    curlss.send (strBudgetRows)
   

Open in new window


on the server side:
      set xmlBudgetRows = Server.CreateObject("Microsoft.XMLDOM") : xmlBudgetRows.async = false
      if xmlBudgetRows.load( request ) then
        response.write strBudgetRows
      else
         response.write "Failed to parse the XML " & xmlBudgetRows.parseError.reason
      end if

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.