Results 1 to 2 of 2

Thread: ASP - XML-COM

  1. #1
    Join Date
    Dec 1969

    Default ASP - XML-COM

    I have a comobject that has a property that returns a string, like this :<BR><BR>Public Property Get XMLstring() As String<BR> If LenB(m_xmlDoc.XML) = 0 Then<BR> Call getXML<BR> m_xmlDoc.loadXML m_strXML<BR> End If<BR> XMLstring = m_xmlDoc.XML<BR>End Property<BR><BR>The string is an xmlstring that i want to use in asp. When i try to call this property from an asp page nothing happens. It doesn&#039;t shoe an error message or nothing...The asp-code look like this:<BR><BR>Dim objInsurance, strXML<BR>Dim objXML<BR>Dim currNode<BR><BR><BR>set objXML = Server.CreateObject("Msxml2.DOMDocument.4.0")<BR>s et objInsurance = Server.CreateObject("Generator.clsPensionReports") <BR>objInsurance.ForetagsID = CLng(objLogon.ForetagsID)<BR>objInsurance.PersonID = Clng(objLogon.PersonID)<BR>objInsurance.ArligTillv axt = cSng(5)<BR>objInsurance.Premieavgift = CSng(1)<BR>objInsurance.ForvaltningsAvgift = CSng(3)<BR>objInsurance.Statslaneranta = CSng(4)<BR>objInsurance.TillvaxtInkomstpension = 1<BR>objInsurance.TillvaxtPremiepension = 3<BR>objXML.async = false<BR>objXML.loadXML(objInsurance.XMLstring) <BR>response.write (objXML.xml)<BR>&#039;Response.Write(currnode)<BR> &#039;Set currNode = objXML.selectSingleNode("Person") <BR>&#039;Set currNode = currNode.selectSingleNode("Fornamn") <BR>&#039;Response.write(currNode.Text)<BR><BR>T he propertycode is in the clsPensionReports class and when i try doing the same thing from a vb exe project it works fine.<BR><BR>Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP - XML-COM

    Have the Property return a Variant, not a String.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts