How to get the xml code of a specific element in the xml using selenium + appium in ios native app

You can get page source from ((iosdriver)driver).getpagesource and find username in name attribute.