hi, I am trying to make an xml file where the first element is called "NEWAPPOINTMENTS" then the next is called "APPOINTMENT" then within APPOINTMENT info such as "START" "END" "SUBJECT" so far I have attempted this using the following code:
VB Code:
Set objDOM = New DOMDocument objDOM.preserveWhiteSpace = True Set objRow = objDOM.createElement("NEWAPPOINTMENTS") objDOM.appendChild objRow Set objField = objDOM.createElement("APPOINTMENT") objRow.appendChild objField Set objField = objDOM.createElement("START") objField.nodeTypedValue = oItem.Start objRow.appendChild objField Set objField = objDOM.createElement("END") objField.nodeTypedValue = oItem.End objRow.appendChild objField Set objField = objDOM.createElement("SUBJECT") 'objField.dataType = "dateTime" objField.nodeTypedValue = oItem.Subject objRow.appendChild objField
this creates me an xml file but dosent put the start, end and subject within the Appointment element, and if i try to make the APPOINTMENT element as appendChild.objRow then i get an error "only one top lvl element allowed"
many thanks for any help




Reply With Quote