vb.net - Write rows in XML using XmlWriter -
i'm tring write rows multiple values using xmlwriter (vb - vs2013 .net 4.0). found googling, examples of codes one:
dim settings new xmlwritersettings() settings.indent = true dim xmlwrt xmlwriter = xmlwriter.create("123.xml", settings) xmlwrt .writestartdocument() .writecomment("blablabla") .writestartelement("test1") .writestartelement("test2") .writestring("text") .writeendelement() .writeendelement() .close() end
this output code above:
<!-- blablabla --> <test1> <test2>text</test2> </test1>
but want line, row multiple values this:
<row nome="value" acessorio="value" codigoncm="99999999" especificacaocomplementar="value" origem="value" quantidade="0.01" unidademedida="value" pesounitario="0.01" nomefabricante="value" numerodocumentonfoudi="0" codigotipodocumento="2" origemitensfinanciaveis="value" custofobunitario="0.01" custocifunitariodolar="0.01" impostoimportacaounitario="0.01" pisunitario="0.01" cofinsunitario="0.01" paisorigem="value" direitosantidumpingunitario="0.01" seq-componente="cmp-2" paginadi="1234"/>
i didn't find method write rows. how accomplish that?
thanks everyone!
in case have same question. way:
xmlwrt .writestartelement("test1") .writeattributestring("key", "value") .writeattributestring("key", "value") .writeendelement() .close() end
Comments
Post a Comment