For example:
//person[@id=\'abc123\']/@haircolor|/@weight\"
PS. there are lots of \"person\" records
Try this:
//person[@id='abc123']/@*[name()='weight' or name()='haircolor']
If you're using an XPath 2.0 processor, you may also use a prettier option:
//person[@id='abc123']/(@haircolor|@weight)`