vb.net - WriteStartElement using an Array value -


i have created xml document using visual basic in visual studio 2010. seems not letting me use array values when write start element.

arrayvalue = array(ubound(array)) dim xw xmlwriter = xmlwriter.create("xmlfile.xml", xws)         xw.writestartdocument()         xw.writestartelement(arrayvalue)         xw.writeendelement()         xw.writeenddocument()         xw.flush()         xw.close() 

wont let me gives me error , nothing. "a first chance exception of type 'system.argumentexception' occurred in system.xml.dll"

whats going on?

you try using xmltextwriter.

arrayvalue = array(ubound(array)) dim xwriter new xml.xmltextwriter("c:\users\admin\desktop\mytest.xml", system.text.encoding.utf8)  xwriter.formatting = formatting.indented xwriter.indentation = 2 xwriter.writestartdocument(true) xwriter.writestartelement(arrayvalue) xwriter.writeendelement() xwriter.flush() xwriter.close() 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -