Re: Formatting XmlTextWriter Output
- From: Martin Honnen <mahotrash@xxxxxxxx>
- Date: Fri, 19 Sep 2008 18:54:38 +0200
Tom Jackson wrote:
What I'm running into is where I want to assign both an attribute and content to an element, i.e. to produce
<content encoding="base64binary">encoded content here</content>
it doesn't like it unless I do a "WriteRaw" for the content:
xw.WriteStartElement("content", null);
xw.WriteAttributeString("encoding", "base64binary");
xw.WriteRaw(messageContent);
xw.WriteEndElement(); // end the content element
This comes out fine, but I was just curious if there was another, better, way?
What does "it doesn't like it" mean exactly? Which code exactly have you tried? Which error exactly did you get?
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.
- References:
- Formatting XmlTextWriter Output
- From: Tom Jackson
- Formatting XmlTextWriter Output
- Prev by Date: Formatting XmlTextWriter Output
- Next by Date: Handling multiple schemas and large files in XML
- Previous by thread: Formatting XmlTextWriter Output
- Next by thread: Handling multiple schemas and large files in XML
- Index(es):
Loading