/ Forums / Advansys Formativ / Creating Solutions with Formativ / Learning Formativ and using Forms and Fields / Reply To: Learning Formativ and using Forms and Fields

#7220
embru
Participant

    Hi

    I generate the xml-String like this:

    set iDOM = Utilities.XMLDom
    set iDoc = iDOM.Document

    set iNode = iDoc.createProcessingInstruction(“xml”, “version=’1.0′”)
    iDoc.appendChild(iNode)
    set iNode = nothing

    set iRoot = iDOM.Document.createElement(“NewUserFormular”)
    set iAttr = iDoc.createAttribute(“id”)
    iAttr.value = “Neu”
    iRoot.setAttributeNode(iAttr)
    set iAttr = nothing

    iDoc.appendChild(iRoot)

    set iFieldsNode = iDoc.createElement(“data”)
    iRoot.appendChild(iFieldsNode)

    set iNode = iDoc.createElement(“nachname”)
    iNode.text = NewUser.NUNachname.Text
    iFieldsNode.appendChild(iNode)
    set iNode = nothing

    My Problem is, that i don’t know, how to load the xml-String in my Variables to use the method GetElementsByTagName.

    my code is currently not working:

    set iDom = Utilities.XMLDom
    set iDoc = iDom.Document
    iDoc.Async = “false”
    iDoc.LoadXML(iMsg.BodyText.PlainText)
    msgbox(iMsg.BodyText.PlainText)

    ‘iDoc.XML = iMsg.BodyText.PlainText
    Set iRoot = iDoc.documentElement

    NewUser.NUNachname=iRoot.getElementsbyTagName(“Nachname”).item(0).text
    NewUser.NUVorname = iRoot.getElementsByTagName(“Vorname”).item(1).text

    thanks