Question XML name expected

solfinker

Well-known member
Joined
Aug 6, 2013
Messages
71
Programming Experience
Beginner
I have the "XML name expected" error in the following line:

Private HT() As String = {{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">}, _

and this tries to be the first row of an array that I'm going to use to writing an html file.

If I change the line to v.gr.
Private HT() As String = {{line1}, _

then my Public Class Form 1 ends up with the error: "Expected beginning '<' for an XML tag"
 
There were "" missing, but how shall I put the ending ones?

Private HT() As String = {"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">", _
"<html xmlns="http://www.w3.org/1999/xhtml">", _

I have tried also:
Dim HT(8, 0) As String
HT(0, 0) ="<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"
but it also takes the second "" as the final one.
So I'm thinking of using a textbox or a label per row, but I suppose there will be nicer ways to do it.

So the whole thread is not about XML, but about text fields. Sorry about it.
Thank you very much for your help.
 
Last edited:
Back
Top