View Single Post
Old 12-07-2012, 09:37 AM   PM User | #5
qwertyjjj
New Coder

 
Join Date: Dec 2007
Posts: 59
Thanks: 1
Thanked 0 Times in 0 Posts
qwertyjjj is an unknown quantity at this point
Quote:
Originally Posted by Alex Vincent View Post
qwertyjjj, XML has no concept of numbers, believe it or not. A parsed DOM of your document will look like this:

multiplyfactor (element)
-- .5 (text node, whose value is a string)

Your best bet would be to have some custom scripting to identify elements containing numbers, and then convert their contents to actual numbers using parseInt or whatever your language's equivalent is.
What is the best way to do this?
Give each XML item an attribute with the datatype or the schema should contain the element datatype and then the software can check the schema?
qwertyjjj is offline   Reply With Quote