Autor Tema: [Problem] How to read UTF-8 nodes  (Leído 2464 veces)

0 Usuarios y 1 Visitante están viendo este tema.

polosa

  • Bytes
  • *
  • Mensajes: 14
  • Reputación: +0/-0
    • Ver Perfil
[Problem] How to read UTF-8 nodes
« 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.

Código: (xml) [Seleccionar]
  <?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>
« última modificación: Diciembre 26, 2010, 11:10:16 am por xkiz »

raul338

  • Terabyte
  • *****
  • Mensajes: 894
  • Reputación: +62/-8
  • xD fan!!!!! xD
    • Ver Perfil
    • Raul's Weblog
Re:[Problem] How to read UTF-8 nodes
« Respuesta #1 en: Diciembre 23, 2010, 12:31:08 pm »
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

xkiz ™

  • Moderador Global
  • Gigabyte
  • *****
  • Mensajes: 283
  • Reputación: +30/-11
    • Ver Perfil
    • xkiz ™
Re:[Problem] How to read UTF-8 nodes
« Respuesta #2 en: Diciembre 25, 2010, 06:51:33 pm »
try this one, it worked for me: SimpleXMLParser by Aleksandar Ruzicic (PSC)
good luck
« última modificación: Diciembre 25, 2010, 06:55:14 pm por xkiz »