Recent

Author Topic: XML special chars convert [SOLVED by Leledumbo and wp]  (Read 113 times)

totya

  • Hero Member
  • *****
  • Posts: 573
XML special chars convert [SOLVED by Leledumbo and wp]
« on: August 13, 2019, 09:13:02 pm »
Hi!

I have a lines from a xml (I read it full manually because I need it), for example (code):

A < < B

This is mean (decode):

A < < B

Is there any built-in function in fpc/Lazarus to convert all exists xml codes (code and decode) from string to string?

Thanks!
« Last Edit: August 13, 2019, 09:46:00 pm by totya »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8090
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: XML special chars convert
« Reply #1 on: August 13, 2019, 09:34:51 pm »
htmlelements unit from fcl-xml has both EscapeHTML and UnescapeHTML functions.

totya

  • Hero Member
  • *****
  • Posts: 573
Re: XML special chars convert
« Reply #2 on: August 13, 2019, 09:40:12 pm »
htmlelements unit from fcl-xml has both EscapeHTML and UnescapeHTML functions.

Seems to me its working, thank you!

wp

  • Hero Member
  • *****
  • Posts: 5998
Re: XML special chars convert [SOLVED by Leledumbo]
« Reply #3 on: August 13, 2019, 09:44:14 pm »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

totya

  • Hero Member
  • *****
  • Posts: 573