|
-
Nov 28th, 2002, 06:12 AM
#1
Thread Starter
Addicted Member
XML String Problem
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.
VB 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
In the above code
CStr(XMLDoc.childNodes(0).childNodes(j).childNodes(11).Text)
is the fractional part.
Thanks,
Pres
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|