XML parsing and editing