XMLParser: attribute gets truncated when updated