as_int() always return 0 value when use pugixml on ios?

Dear everyone
i use pugixml for cocos2d-x (using c++) on ios.
i add three file pugixml.hpp, pugixml.cpp, pugiconfig.hpp to my project.

When i do follow this link :“http://pugixml.googlecode.com/svn/tags/latest/docs/samples/traverse_base.cpp”

but as_int() alway return 0 value.

I don’t know why
Please help me!

Thank You!

I think you should paste more code.