You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, this is pretty weird... Is there any reason I get '0' instead of 0 ?
iex(33)> count = "<posts count=\"0\" offset=\"0\"/>" |> xpath(~x"//posts/@count"l)
['0']
iex(34)> List.first count
'0'
iex(35)> i List.first count
Term
'0'
Data type
List
Description
This is a list of integers that is printed as a sequence of characters
delimited by single quotes because all the integers in it represent valid
ASCII characters. Conventionally, such lists of integers are referred to as
"charlists" (more precisely, a charlist is a list of Unicode codepoints,
and ASCII is a subset of Unicode).
Raw representation
[48]
Reference modules
List
iex(36)>
The text was updated successfully, but these errors were encountered:
Fnux
changed the title
xpath returns ['0'] (charlist?) instead of [0]
xpath returns charlist instead of integer
Jul 22, 2016
Well, this is pretty weird... Is there any reason I get '0' instead of 0 ?
The text was updated successfully, but these errors were encountered: