我正在使用XmlWriter,我想知道是否有人试图用属性编写xml元素字符串(叶节点),以便输出看起来像
<book id='1' author='j.k.rowling' year='2010'>999</book>
Run Code Online (Sandbox Code Playgroud)
代替
<book id='1' author='j.k.rowling' year='2010'>
<book>999</book>
</book>
Run Code Online (Sandbox Code Playgroud) xml ×1