This topic contains 1 reply, has 2 voices, and was last updated by  Eliot Muir 8 years, 6 months ago.

Returning XML content as a single string

  • I’m working with creating XML-formatted data to use in a SQL call. Although I now have the data processing into the XML tree, when I assign it to a variable for use in the call:

    ContactData = tostring(ContactXML)

    the output looks like the tree:

    exec Create_PatientEncounterState '','2042201','18820070','PREADMITTEST','brownSUGAR','F','1980-09-12 00:00:00','2014-05-20 00:00:00','','A05','0','0','<Contact>
       <EmailList>
          <Email isPreferred="1">PREADMITTESTsugar@gmail.com</Email>
       </EmailList>
       <PhoneList>
          <Phone type="Home" isPreferred="1">(888)477-1973</Phone>
       </PhoneList>
       <Address>
          <isPreferred>1</isPreferred>
          <StreetAddress1>12771 GENERIC BLVD</StreetAddress1>
          <StreetAddress2></StreetAddress2>
          <City>GARDEN GROVE</City>
          <State>CA</State>
          <PostalCode>92845</PostalCode>
          <Country></Country>
       </Address>
    </Contact>','pw988018836'

    I imagine that’s not going to be handled well. Theoretically, I could use gsub() to string the linebreaks from the string first, but I was wondering if there was a switch already in Iguana that will do this.

    -Robert James,
    Interface Analyst,
    GetWellNetwork, Inc.

You must be logged in to reply to this topic.