Click here to Skip to main content
16,005,697 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to retrieve HTML source from firefox Pin
GaryWoodfine 30-Oct-06 21:59
professionalGaryWoodfine 30-Oct-06 21:59 
AnswerRe: How to retrieve HTML source from firefox Pin
GaryWoodfine 30-Oct-06 22:01
professionalGaryWoodfine 30-Oct-06 22:01 
GeneralRe: How to retrieve HTML source from firefox Pin
PatrickDC31-Oct-06 6:21
PatrickDC31-Oct-06 6:21 
QuestionPacket sniffing, network traffic capturing source Pin
winmedia30-Oct-06 7:17
winmedia30-Oct-06 7:17 
AnswerRe: Packet sniffing, network traffic capturing source Pin
Ray Cassick30-Oct-06 12:43
Ray Cassick30-Oct-06 12:43 
GeneralRe: Packet sniffing, network traffic capturing source Pin
winmedia31-Oct-06 2:22
winmedia31-Oct-06 2:22 
QuestionXmlTextWriter Text Values Pin
rahvyn630-Oct-06 6:44
rahvyn630-Oct-06 6:44 
AnswerRe: XmlTextWriter Text Values Pin
rahvyn630-Oct-06 9:46
rahvyn630-Oct-06 9:46 
I have the above problem figured out. However, my output is odd. Using the following code:

xws = New XmlWriterSettings
xws.Indent = True
xws.CheckCharacters = True
xws.IndentChars = " "
xws.NewLineOnAttributes = True
xws.Encoding = System.Text.Encoding.UTF8
xws.CloseOutput = False
Dim test As New System.Text.StringBuilder

'Create the access request portion
Using xw As XmlWriter = XmlWriter.Create(test, xws)
xw.WriteStartDocument(False)
xw.WriteStartElement("AccessRequest")
xw.WriteAttributeString("xml", "lang", Nothing, "en-US")
xw.WriteElementString("AccessLicenseNumber", "LicNum")
xw.WriteElementString("UserId", "UID")
xw.WriteElementString("Password", "PW")
xw.WriteEndElement()
xw .WriteEndDocument()
xw.Flush()
xw.Close()
End Using

Return test.ToString()

And the output is as follows:

<?xml version="1.0" encoding="utf-16" standalone="no"?>
<AccessRequest
xml:lang="en-US">
<AccessLicenseNumber>LicNum</AccessLicenseNumber>
<UserId>UID</UserId>
<Password>PW</Password>
</AccessRequest>

I set the encoding version in the xmlWriterSettings, so why is it putting in utf-16? Also, I dont understand why there is a line feed between the AccessRequest and its attribute. Is this normal?

Thanks
AnswerRe: XmlTextWriter Text Values Pin
Oskar.net30-Oct-06 23:54
Oskar.net30-Oct-06 23:54 
GeneralRe: XmlTextWriter Text Values Pin
rahvyn631-Oct-06 2:48
rahvyn631-Oct-06 2:48 
AnswerRe: XmlTextWriter Text Values Pin
Oskar.net31-Oct-06 4:01
Oskar.net31-Oct-06 4:01 
GeneralRe: XmlTextWriter Text Values Pin
rahvyn631-Oct-06 4:26
rahvyn631-Oct-06 4:26 
QuestionPrinting from a windows form directly to a default printer Pin
underb@asd20.org30-Oct-06 5:47
underb@asd20.org30-Oct-06 5:47 
AnswerRe: Printing from a windows form directly to a default printer Pin
underb@asd20.org30-Oct-06 11:12
underb@asd20.org30-Oct-06 11:12 
Questionthe Source code of a programe about “ sending message, picture, sound Pin
pham quang dan30-Oct-06 2:37
pham quang dan30-Oct-06 2:37 
AnswerRe: the Source code of a programe about “ sending message, picture, sound Pin
Dave Kreskowiak30-Oct-06 3:57
mveDave Kreskowiak30-Oct-06 3:57 
GeneralRe: the Source code of a programe about “ sending message, picture, sound Pin
nlindley730-Oct-06 4:04
nlindley730-Oct-06 4:04 
GeneralRe: the Source code of a programe about “ sending message, picture, sound Pin
Dave Kreskowiak30-Oct-06 6:47
mveDave Kreskowiak30-Oct-06 6:47 
QuestionHow to show only vertical lines(column borders) in listview Pin
venkatarama30-Oct-06 2:28
venkatarama30-Oct-06 2:28 
AnswerRe: How to show only vertical lines(column borders) in listview Pin
Dave Kreskowiak30-Oct-06 4:00
mveDave Kreskowiak30-Oct-06 4:00 
QuestionA DLL Question Pin
<color>Aljechin 30-Oct-06 1:21
<color>Aljechin 30-Oct-06 1:21 
AnswerRe: A DLL Question Pin
Reuven Elliassi30-Oct-06 3:46
Reuven Elliassi30-Oct-06 3:46 
GeneralRe: A DLL Question Pin
Reuven Elliassi30-Oct-06 3:50
Reuven Elliassi30-Oct-06 3:50 
AnswerRe: A DLL Question Pin
Dave Kreskowiak30-Oct-06 3:55
mveDave Kreskowiak30-Oct-06 3:55 
AnswerRe: A DLL Question Pin
b43r_3oo330-Oct-06 9:59
b43r_3oo330-Oct-06 9:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.