dorina_
03-26-2008, 05:31 AM
Hi,
I have a problem with the following piece of code:
For t = 1 To j
Set XMLElement = XMLDoc.createElement("Correspondance")
Nodes = Split(sSgnMeasured, SIGNAL_DELIMITER)
sSignal = Nodes(k)
sVariabMat = Nodes(k + 1)
Call XMLElement.setAttribute("Signal", sSignal)
Call XMLElement.setAttribute("Var", sVar)
Call XMLParent.appendChild(XMLElement)
Next
which should return something like:
<Correspondance Signal="signal1" Var="signal1_M" />
<Correspondance Signal="signal2" Var="signal2_M" />
but it returns:
<Correspondance Signal="signal2" Var="signal2_M" />
<Correspondance Signal="signal2" Var="signal2_M" />
(it just puts the last signal in).
sSgnMeasured.......has the value of the item on which is clicked on, in the listbox.
I used some MsgBox-es to see what is stored in sSignal and in sVariabMat, and they store the right values, but when I look in the xml file, it looks wrong.
Please give me an idea of what I should change
Regards,
dori
I have a problem with the following piece of code:
For t = 1 To j
Set XMLElement = XMLDoc.createElement("Correspondance")
Nodes = Split(sSgnMeasured, SIGNAL_DELIMITER)
sSignal = Nodes(k)
sVariabMat = Nodes(k + 1)
Call XMLElement.setAttribute("Signal", sSignal)
Call XMLElement.setAttribute("Var", sVar)
Call XMLParent.appendChild(XMLElement)
Next
which should return something like:
<Correspondance Signal="signal1" Var="signal1_M" />
<Correspondance Signal="signal2" Var="signal2_M" />
but it returns:
<Correspondance Signal="signal2" Var="signal2_M" />
<Correspondance Signal="signal2" Var="signal2_M" />
(it just puts the last signal in).
sSgnMeasured.......has the value of the item on which is clicked on, in the listbox.
I used some MsgBox-es to see what is stored in sSignal and in sVariabMat, and they store the right values, but when I look in the xml file, it looks wrong.
Please give me an idea of what I should change
Regards,
dori