The Set newNode=xDoc. Createelement method (" Declaration ")
The Set tNode=xDoc. DocumentElement. The appendChild (newNode)
The Set newNode=xDoc. Createelement method (" BorderTransportMeans ")
The Set tNode=xDoc. DocumentElement..childnodes. Item (1) the appendChild (newNode)
The Set newNode=xDoc. Createelement method (" JourneyID ")
The Set dNode=xDoc. DocumentElement..childnodes. Item (1) the appendChild (newNode)
DNode. The appendChild (xDoc. CreateTextNode (" border town "))
The code above how to write out the following XML, ask ace to give directions, thank you!
The book & lt;/JourneyID>
CodePudding user response:
Looking at all dizzy, layer, a layer of a layer of introns node, the last one to a text nodeSimplify:
Dim xdoc As New DOMDocument60
The Set newNode=xdoc. The appendChild (xdoc. The createElement method (" Declaration "))
The Set newNode=newNode. The appendChild (xdoc. The createElement method (" BorderTransportMeans "))
The Set newNode=newNode. The appendChild (xdoc. The createElement method (" JourneyID "))
The Set newNode=newNode. The appendChild (xdoc. CreateTextNode (" border town "))
The Debug. Print xdoc. XML
CodePudding user response: