Hi,
I am reading a XML string from a database and writing into a file. The problem is I have some fraction values in the database. Iam using MSXML parser to read the XML string and write it. But it converts all the fraction to date and writes to the file.
For example if I have 5/8 in my XML string, it is written in file as 8-May.
I even tried CStr, but it didn't work. AmI doing something wrong?
I have given the code below.
In the above codeVB Code:
strTempString = XMLDoc.childNodes(0).childNodes(j).childNodes(0).Text & "," & _ strPriceKey & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(3).Text & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(4).Text & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(7).Text & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(8).Text & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(2).Text & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(5).Text & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(6).Text & "," & _ CStr(XMLDoc.childNodes(0).childNodes(j).childNodes(11).Text) & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(10).Text & "," & _ XMLDoc.childNodes(0).childNodes(j).childNodes(9).Text strFileArray(j) = strTempString intFnum = FreeFile Open strFilename For Output Lock Write As #intFnum For i = 0 To UBound(strFileArray) Print #intFnum, strFileArray(i) Next i Erase strFileArray Close #intFnum
CStr(XMLDoc.childNodes(0).childNodes(j).childNodes(11).Text)
is the fractional part.
Thanks,
Pres


Reply With Quote
