I’m converting my InfoPath 2003 Object Model Codes to InfoPath 2007 Managed Code, I want to add an attribute and childNodes to a section of form on form load event (FormEvents_Loading). I want to update the following section:
I was to add an attribute to mstns:SpecificBook node and a few child node. The result should be:
My InfoPath 2003 Object Model code
To Adding and Set attribute values:
flag = TheXDocument.DOM.createAttribute("active") prereqsNode.attributes.setNamedItem(flagNode).text = "true"
newNode = doc.CreateNode(NodeTypeElemt, FromNamespacePrefix, "Book",FormNamespace)
specificBookAttrib = newNode.OwnerDocument.CreateAttribute("BookId")
specificBookIdAttrib.Value = “anybook”
newNode.Attributes.Append(specificBookIdAttrib)
SpecificBookNode.AppendChild(newNode)
Can anybody help me convert the line above use Manage code?