如果您喜欢小提琴,请单击此处。
在我的调试器中,我有一个 XmlElement.OuterXml:
<?xml version="1.0"?>
<p:sld mc:Ignorable="p14 a14 p15 p16 a16 thm15 adec ahyp v"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:asvg="http://schemas.microsoft.com/office/drawing/2016/SVG/main"
xmlns:ahyp="http://schemas.microsoft.com/office/drawing/2018/hyperlinkcolor"
xmlns:adec="http://schemas.microsoft.com/office/drawing/2017/decorative"
xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main"
xmlns:p16="http://schemas.microsoft.com/office/powerpoint/2015/main"
xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:a16="http://schemas.microsoft.com/office/drawing/2014/main"
请注意,它是 mc:Ignorable,而不是 Ignorable。
我调用 XmlElement.Attributes 并且其中一个属性是 Ignorable 但是......
它丢失了前缀/命名空间。
知道这里发生了什么吗?
更新:我还在 MSDN 上发布了到目前为止的答案是这是一个错误,我很惊讶这么基本的东西会出错。