我在解析pptx文件时遇到了问题。这是源XML的示例:我需要获取sldMasterId标签中的r:id属性值。doc=Nokogiri::XML(path_to_pptx)doc.xpath('p:presentation/p:sldMasterIdLst/p:sldMasterId').attr('id').value返回2147483648但我需要rId2,这是r:id属性值。我找到了attribute_with_ns(name,namespace)方法,但是doc.xpath('p:presentation/p:sldMasterIdLst/p:sldMasterId').att