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
0
votes
1 answer

XmlTextWriter serialize Object to XML element

I would like to perform object serialization to only one branch in an existing XML file. While reading by using: RiskConfiguration AnObject; XmlSerializer Xml_Serializer = new XmlSerializer(typeof(RiskConfiguration)); …
Emil J
  • 215
  • 2
  • 4
  • 20
0
votes
1 answer

XmlTextWriter responds with System.InvalidOperationException during creation of second element

I am having trouble with XMLTextWriter.WriteStartElement throwing an exception: System.InvalidOperationException when trying to write the second element in my XML document. This error comes back as "The Writer is closed". I have not closed it, so…
Scott Lundberg
  • 435
  • 2
  • 10
0
votes
1 answer

xmlTextWriter does not save the XML file to bin folder

I am trying to create an XML file for storing some info from a class. I gave the path as a const set to Info.xml. but the XMLTextWriter is not saving the XML file to bin(debug/release) folder, rather it is saving it to MyDocuments folder. When i…
Developer
  • 309
  • 5
  • 8
  • 19
0
votes
1 answer

SSIS: Add schema to xml file

I need to pull data from a database and create an xml file via ssis. So far, I've created a script that can successfully create an xml file (using XmlTextWriter), listing all necessary data, however, they also want the schema listed within the file…
goalie35
  • 786
  • 3
  • 14
  • 34
0
votes
1 answer

How to write a string into a xml file on c#?

I've created a xml file using c#. XmlTextWriter writer = new XmlTextWriter("Product.xml", System.Text.Encoding.UTF8); writer.WriteStartDocument(true); writer.Formatting = Formatting.Indented; writer.Indentation = 2; Then, I create my string: string…
user1051434
  • 167
  • 1
  • 5
  • 17
0
votes
1 answer

Exporting XmlTextWriter output to string using vb.net

I would like to export(convert) XmlTextWriter output data to string variable. My code as follows : '' write data as xml Dim objX As New XmlTextWriter(Response.OutputStream, Encoding.UTF8) objX.WriteStartDocument() …
Dan
  • 343
  • 3
  • 9
  • 21
0
votes
3 answers

xmltextwriter path in c#

I am trying to use xmltextwriter and assign a path which needs to use for writing. I am trying this: string path = "~/Uploads/site/" + Current.User.Id + .kml"; XmlTextWriter xtr = new XmlTextWriter(path,…
Laziale
  • 7,965
  • 46
  • 146
  • 262
0
votes
0 answers

How to parse hierarchial XML from Excel sheet

I am trying to parse an XML file as provided below with C# and XmlTextWriter Example: from an Excel workbook, that contains one…
0
votes
1 answer

XMLTextWriter C# and no data found for standard xml

So I am dealing with some hard core Legacy code here. We are talking .NET 2.0. My problem is that my program when run is spitting out an exception with the information saying No Data found for Standard XML. I am using the class XMLTextWriter. As…
Tony
  • 4,609
  • 2
  • 22
  • 32
0
votes
1 answer

Performance issues creating an XML file from Database

I'm trying to write an XML file, which is a Google Product feed, but it's very slow. Having done quite a bit of Googling, I am not sure of the fastest approach, except for breaking it into smaller files. I have about 3500 products currently, and…
Jamie Hartnoll
  • 7,231
  • 13
  • 58
  • 97
0
votes
1 answer

how to use XMLTextWriter to write XML node at a specified position

I have an xml file likes below. Title Content I want to write a new node after 'Content', I know how to use XMLDocument to do that, is there a way to use…
James
  • 2,570
  • 7
  • 34
  • 57
0
votes
2 answers

.Net date conversion to RSS date

I have a date in String format, mm/dd/yyyy I want to convert this to RSS date format like, friday, june 01, 2012, 12:11:25PM and i want to add this date value which is basically the pubDate to RSS pubDate tag, as…
Geek
  • 3,187
  • 15
  • 70
  • 115
0
votes
3 answers

Remove special case indentation in XML files

I want to modify a XML file but the tricky part is that the info I add should have minimal formatting. I have been searching for a while and I can't seem to find an answer. Here's what the XML looks currently (original):
inquisitive_one
  • 1,465
  • 7
  • 32
  • 56
0
votes
1 answer

xmlTextReader.ReadInnerXml() is pulling in my entire XML doc into one variable

I am creating XML index files to be read in a later step. I have variable length arrays, and I am writing them to one file. There is a problem, I think its inside the reader code. For some reason the TimeStamp and Long elements are read into arrays…
kevp
  • 377
  • 2
  • 7
  • 23
0
votes
1 answer

Want to add image to aspx rss page

I have a cod where my aspx.cs file writes to an aspx the xml tags. Now I have a requirement where I need to add logo at the end of the 'title' tag. this is my code, writer.WriteStartDocument(); writer.WriteStartElement("rss"); …
Geek
  • 3,187
  • 15
  • 70
  • 115
1 2 3 4 5 6 7
8