Hallo!
Seit neuestem hab ich folgendes Problem: Beim generieren einer XML-Datei erscheint mir ein Fehler(im Titel). Könnte vielleicht jemand den Code durchgucken?
Code: Der Fehler ist angeblich in Zeile 22.
Mfg, C8002.
Seit neuestem hab ich folgendes Problem: Beim generieren einer XML-Datei erscheint mir ein Fehler(im Titel). Könnte vielleicht jemand den Code durchgucken?
Code: Der Fehler ist angeblich in Zeile 22.
VB.NET-Quellcode
- Public Shared Sub Save_XML(Info As XMLInfo, Output As String)
- Dim Writer As New XmlTextWriter(Output, Text.Encoding.UTF8)
- Writer.WriteStartDocument(True)
- Writer.Formatting = Formatting.Indented
- Writer.Indentation = 2
- Writer.WriteStartElement("meta")
- Writer.WriteStartElement("title")
- Writer.WriteString(Info.Title)
- Writer.WriteEndElement()
- Writer.WriteStartElement("desc")
- Writer.WriteString(Info.Description)
- Writer.WriteEndElement()
- Writer.WriteStartElement("parts")
- Writer.WriteString(Convert.ToString(Info.Parts))
- Writer.WriteEndElement()
- Writer.WriteEndElement()
- Writer.WriteStartElement("quests")
- Dim QIndex As Integer = 0
- For Each Q As Question In Info.Questions
- QIndex += 1
- Writer.WriteStartElement("quest" & QIndex)
- Writer.WriteStartElement("quest")
- Writer.WriteString(Q.Question)
- Writer.WriteEndElement()
- Writer.WriteStartElement("answ")
- Writer.WriteString(Q.Answer)
- Writer.WriteEndElement()
- Writer.WriteStartElement("index")
- Writer.WriteString(Convert.ToString(Q.IndexInProgress))
- Writer.WriteEndElement()
- Writer.WriteEndElement()
- Next
- Writer.WriteEndElement()
- Writer.WriteStartElement("TFs")
- Dim TIndex As Integer = 0
- For Each TF As TrueFalse In Info.TrueFalses
- TIndex += 1
- Writer.WriteStartElement("tf" & TIndex)
- Writer.WriteStartElement("quest")
- Writer.WriteString(TF.Question)
- Writer.WriteEndElement()
- Writer.WriteStartElement("answ")
- Writer.WriteString(TF.Answer)
- Writer.WriteEndElement()
- Writer.WriteStartElement("index")
- Writer.WriteString(Convert.ToString(TF.IndexInProgress))
- Writer.WriteEndElement()
- Writer.WriteEndElement()
- Next
- Writer.WriteEndElement()
- Writer.WriteStartElement("MAs")
- Dim MIndex As Integer = 0
- For Each MA As MultiAnswer In Info.MultiAnswers
- MIndex += 1
- Writer.WriteStartElement("MA" & MIndex)
- Writer.WriteStartElement("quest")
- Writer.WriteString(MA.Question)
- Writer.WriteEndElement()
- Writer.WriteStartElement("answ")
- Writer.WriteString(MA.Answer)
- Writer.WriteEndElement()
- Writer.WriteStartElement("index")
- Writer.WriteString(Convert.ToString(MA.IndexInProgress))
- Writer.WriteEndElement()
- Writer.WriteEndElement()
- Next
- Writer.WriteEndElement()
- Writer.WriteEndDocument()
- Writer.Close()
- End Sub
Mfg, C8002.
“If debugging is the process of removing software bugs, then programming must be the process of putting them in.”
-Unbekannt
-Unbekannt