Visual Basic Foro
Programación => Visual Basic 6 => Mensaje iniciado por: polosa en Diciembre 23, 2010, 07:26:54 am
-
Sorry My English is not good.
Write to ask how to read utf-8 nodes.
Nodes are fixed.
I want to read <Col> </ Col> in the project.
And should read <! [CDATA []]> in the TITLE item.
After the show
Name
DATA1
DATA2
TITLE1
DATA3
TITLE2
DATA4
DATA5
DATA6
How do I make
polosa.
<?xml version="1.0" encoding="UTF-8" ?>
- <Data>
- <List>
<Col>Name</Col>
<Col>DATA1</Col>
<Col>DATA2</Col>
- <Col>
- <![CDATA[ TITLE1 ]]>
</Col>
<Col>DATA3</Col>
- <Col>
- <![CDATA[ TITLE2 ]]>
</Col>
<Col>DATA4</Col>
<Col>DATA5</Col>
<Col>DATA6</Col>
</List>
- <List>
<Col>Name</Col>
<Col>DATA1</Col>
<Col>DATA2</Col>
- <Col>
- <![CDATA[ TITLE1 ]]>
</Col>
<Col>DATA3</Col>
- <Col>
- <![CDATA[ TITLE2 ]]>
</Col>
<Col>DATA4</Col>
<Col>DATA5</Col>
<Col>DATA6</Col>
</List>
</Data>
-
Well you have StrConv to convert normal to utf (vbUnicode) and utf to normal (vbFromUnicode)
By API you have MultiByteToWideChar and WideCharToMultiByte but i dont know how to use it (I tried but... its strange xD)
And to read XML nodes, well... use a XML engine, or read as a text :3
-
try this one, it worked for me: SimpleXMLParser by Aleksandar Ruzicic (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=64975&lngWId=1) (PSC)
good luck