Questions tagged [xmltextwriter]

Represents a writer that provides a fast, non-cached, forward-only way of generating streams

Represents a writer that provides a fast, non-cached, forward-only way of generating streams or files containing XML data that conforms to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML recommendations.

http://msdn.microsoft.com/en-us/library/system.xml.xmltextwriter%28v=vs.110%29.aspx

120 questions
1
vote
2 answers

Little help using XmlTextWriter on writing "xhtml:link" element of sitemap.xml

Hello I'm trying to write a string like : using XmlTextWriter class I've tried this piece of code: // Write Alternative links …
Cristian E.
  • 3,116
  • 7
  • 31
  • 61
1
vote
1 answer

XmlTextWriter cannot be found after using system.xml

I have enabled using.System.XML but it cannot find the XmlTextWriter. I saw that this is the using that i need in order to get it. Please help! I am using VS Pro 2013
Snooker Ball
  • 85
  • 1
  • 2
  • 10
1
vote
3 answers

Check output size using .NET XmlTextWriter

I need to generate an XML file and i need to stick as much data into it as possible BUT there is a filesize limit. So i need to keep inserting data until something says no more. How do i figure out the XML file size without repeatably writing it to…
user34537
1
vote
2 answers

Why can't I overwrite an XML file that I read (i think I closed all streams)?

Question: The below program should read all XML report files (*.rdl files) in the folder specified in strPat, modify them according to my code, and save the modified XML file in folder /Desktop/AutoModifiedReports/filename.rdl, and then copy…
Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
1
vote
0 answers

How to set a cell color with XmlTextWriter

My program generates an Excel file using XmlTextWriter. I cannot find how exactly I could set colors of some cells (or even rows). Here is some of my code: public static void CreateCell(XmlTextWriter w, object value) { …
David Shochet
  • 5,035
  • 11
  • 57
  • 105
1
vote
1 answer

XmlTextWriter c# prints also html source code of the page

i have this function for generating an xml file.. the problem is that when i download the generated file, i have my xml correctly formatted but at the end of this also the html source code of the page where i have clicked the button for generate…
Stefano
  • 11
  • 1
1
vote
2 answers

Using XmlTextWriter with iTunes podcast

I have the following code generating an XML podcast file for iTunes podcast: Dim writer As New XmlTextWriter("c:\jdir\test.xml", System.Text.Encoding.UTF8) writer.WriteStartDocument(True) writer.Formatting = Formatting.Indented writer.Indentation =…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
1
vote
3 answers

Question about XMLTextWriters and Streams

We have a VXML project that a 3rd party parses to provide us with a phone navigation system. We require them to enter an id code to leave a message, which is later reviewed by our company. We currently have this working as…
Jeff
  • 2,835
  • 3
  • 41
  • 69
1
vote
0 answers

Write correct DataGridView cell backcolour

I have a DataGridView in which certain cells change color to red on click and back to white on click again. The problem I am having is that if I haven't clicked on a cell, the code thinks the cell's background color is 0 instead of white. I am…
user1709803
1
vote
2 answers

XmlTextWriter: Allows Unicode?

I'm using XmlTextWriter to save certain configuration elements for my program (it's only 10-15 string values, this is why I'm using XmlTextWriter). My code looks as follows: XmlTextWriter writer = new XmlTextWriter("FILENAME.XML",…
Bab Yogoo
  • 6,669
  • 6
  • 22
  • 17
1
vote
1 answer

Writing cyrillic characters into an xml file

I'm using xmlTextWriter from the libxml2 to write some xml files. And I need to write cyrillic characters into them. I do it this way: xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); ... snprintf(buf, sizeof(buf), "%s",…
hank
  • 9,553
  • 3
  • 35
  • 50
1
vote
1 answer

How to use XmlTextWriter to write a object into XML?

I generated a Class with a XML Schema (.xsd) using the Visual Studio xsd tool. Now I have the class and I want to output that object back into XML as defined by my xsd. I am wondering how to do that. Thank you!
formatjam
  • 347
  • 1
  • 3
  • 13
0
votes
1 answer

Xdocument.Load is failing

I am unable to load Xdocument.Load I am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am unable to load Xdocument.LoadI am…
SmilingLily
  • 333
  • 1
  • 5
  • 17
0
votes
1 answer

CPU intensive XmlTextWriter

I have a web application that creates XML feeds on the fly, depending on criteria passed in via the query string. It is a very simple application: it reads the query string variables, and uses them to format data (cached data from the database) into…
Rebecca
  • 577
  • 4
  • 11
0
votes
0 answers

Nested Foreach exiting after first loop - writing xml element

I am trying to create nested xml elements to look like below however the created file only contains the first element from headingTags and then the first foreach loop is exited. Why is this happening?
Ellak123
  • 25
  • 6