Sample code for 30+ languages & platforms
Dart

Decode HTML Entities found in XML

Demonstrates how to decode HTML entities found in XML.

Chilkat Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

void main() {
  // Load an XML file containing the following:

  // <?xml version="1.0" encoding="UTF-8"?>
  // <output>Franz&#xf6;sische</output> 

  final xml = CkXml();
  xml.loadXmlFile('qa_data/xml/hasHtmlEntity.xml');

  // Get non-decoded content, then get decoded content.

  // Result is Franz&#xf6;sische
  print(xml.content);

  // Result is Französische
  final strDecoded = xml.decodeEntities(xml.content);
  print(strDecoded);
}