Sample code for 30+ languages & platforms
React Native

Decode HTML Entities found in XML

Demonstrates how to decode HTML entities found in XML.

Chilkat React Native Downloads

React Native
import { Xml } from '@chilkat/react-native'

function chilkatExample() {
  // Load an XML file containing the following:

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

  const xml = new Xml();
  xml.loadXmlFile('qa_data/xml/hasHtmlEntity.xml');

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

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

  // Result is Französische
  const strDecoded = xml.decodeEntities(xml.content);
  console.log(strDecoded);
}