Click here to Skip to main content
13,147,037 members (61,696 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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();


Thanks.

Regards,
Sajith
Posted 16-Jan-12 0:39am
sajithnet1.2K
Updated 23-Jan-12 3:54am
Ravi Sant22.1K
v2
Comments
SAKryukov 23-Jan-12 12:34pm
   
Styles? And what's the purpose if this code sample.
--SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I appreciate your fantasy, but there is no such thing.

—SA
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

You tagged the question to C# 4.0.
Take a look at XElement class[^]
With XElement you can write the same code like this:
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),


Or look at XmlWriterSettings Class[^]. There you can customize the writing behavior for the XmlWriter.
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web03 | 2.8.170915.1 | Last Updated 23 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100