found way to get jquery like functionality on dom parsing server-side