[dba-VB] XML DOM to string?

MartyConnelly martyconnelly at shaw.ca
Mon Aug 29 17:37:33 CDT 2005


Why not grab the intial html string returned down the wire by the soap 
call before you place it in the xmldom.
It would look something like this. Just strip off the envelope xml code 
and use the soap body.
Assuming you are using xmlhttp it would be contained  in 
XMLHTTP.responseXML.xml
rather than XMLHTTP.responseText.

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body><FullZipCodeResponse xmlns="http://webservices.eraserver.net/">
<FullZipCodeResult>00000-0000</FullZipCodeResult>
</FullZipCodeResponse>
</soap:Body>
</soap:Envelope>



Francisco Tapia wrote:

>Well I need the XML formated in the way I metioned earlier, that's
>because I then make a call to a soap object in which it calls a PICK
>database (Unidata) to deliver an order.  Originally I had a For XML
>call from sql server but I was not able to take that result and stuff
>it into a variable, so I did it in VB, I have a class that I use to
>create the xml as previously listed, so I finished my document, but
>wanted to simply make the soap call when I realized that this was an
>object and not a string, thus it wasn't gonna work.  My current
>solution is to save it temporarily to the disk and re-read it back to
>a string variable as a text file using LOF, it works fine, and on my
>system is actually really quick, but it was just a bother.
>
>On 8/29/05, Jim DeMarco <Jdemarco at hudsonhealthplan.org> wrote:
>  
>
>>Francisco,
>>
>>I'm not quite sure what you need to do.  You can create the XML from data in your database and you can persist it into a file.  Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>>
>>Jim DeMarco
>>
>>-----Original Message-----
>>From: dba-vb-bounces at databaseadvisors.com
>>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
>>Sent: Monday, August 29, 2005 2:25 PM
>>To: dba-vb at databaseadvisors.com
>>Subject: [dba-VB] XML DOM to string?
>>
>>
>>I'm messing around w/ XML and it's quite late I suppose since there
>>really is so much I do not know... what I'm trying to do, I have a
>>class that I use to create a complex XML, that is:
>>
>>I can save my xmldom object down to a file, but then I'd have to
>>re-open it and read it all back into a string, and I wondered since
>>it's in memory if I can just somehow save it to a string instead...
>>any clues?
>>Thanks
>>
>>
>>WSOrder>
>>- <Header>
>>  <CustID>FO440</CustID>
>>  <CompanyName />
>>  <UserType />
>>  <UserNo />
>>  <Address1 />
>>  <Address2 />
>>  <Address3 />
>>  <City />
>>  <State />
>>  <Zip />
>>  <Country />
>>  <Contact />
>>  <Phone />
>>  <Notes />
>>  <ShipMethod />
>>  <PurchaseOrder />
>>  <ShipToID />
>>  <SchedDate />
>>  <Freight />
>>  </Header>
>>- <OrderItems>
>>- <WSOrderItem>
>>  <PartNumber>93-1000</PartNumber>
>>  <Quantity>10</Quantity>
>>  <SerialNumber>21222</SerialNumber>
>>  </WSOrderItem>
>>- <WSOrderItem>
>>  <PartNumber>22-2222</PartNumber>
>>  <Quantity>5</Quantity>
>>  <SerialNumber>50101</SerialNumber>
>>  </WSOrderItem>
>>- <WSOrderItem>
>>  <PartNumber>33-3333</PartNumber>
>>  <Quantity>33</Quantity>
>>  <SerialNumber>696969</SerialNumber>
>>  </WSOrderItem>
>>  </OrderItems>
>>  </WSOrder>
>>
>>
>>--
>>-Francisco
>>http://pcthis.blogspot.com |PC news with out the jargon!
>>http://sqlthis.blogspot.com | Tsql and More...
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>***********************************************************************************
>>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
>>***********************************************************************************
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>    
>>
>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the dba-VB mailing list