Fix semantic path when other is parent
Add newline when writing xml