本文介绍了XmlWriter中的不同样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以将什么样式应用于xmlwriter
.请分享.
我在报表中显示xmlwriter
对象.
Hi,
What are the different styles that can be applied to xmlwriter
. Please share.
I''m showing xmlwriter
object in my report .
xmlWriter.WriteStartElement("Glyphs");
xmlWriter.WriteAttributeString("Fill","#ff000000");
xmlWriter.WriteAttributeString(
"FontUri",xpsFonts[0].Uri.ToString());
xmlWriter.WriteAttributeString("FontRenderingEmSize","18");
xmlWriter.WriteAttributeString("OriginX","120");
xmlWriter.WriteAttributeString("OriginY","110");
xmlWriter.WriteAttributeString("UnicodeString",documentUri);
xmlWriter.WriteEndElement();
谢谢.
问候,
Sajith
Thanks.
Regards,
Sajith
推荐答案
var x = new XElement("Glyphs",
new XAttribute("Fill", "#ff000000"),
new XAttribute("FontUri", xpsFonts[0].Uri.ToString()),
new XAttribute("FontRenderingEmSize", "18"),
new XAttribute("OriginX", "120"),
new XAttribute("OriginY", "110"),
new XAttribute("UnicodeString", documentUri),
或查看 XmlWriterSettings类 [ ^ ].在那里,您可以自定义XmlWriter的书写行为.
Or look at XmlWriterSettings Class[^]. There you can customize the writing behavior for the XmlWriter.
这篇关于XmlWriter中的不同样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!