0

I've read and converted a file into a XML file. The file format will always be as shown below:

<?xml version="1.0" encoding="UTF-8"?>
<family>
    <person>
        <id>I1@</id>
        <name>Joao</name>
        <father>I2@</father>
        <mother>I3@</mother>
    </person>
    <person>
        <id>I5@</id>
        <name>Joao</name>
        <father>I2@</father>
        <mother>I3@</mother>
    </person>
</family>

With this i need to create a simple HTML page, that would still keep the XML format and maybe even allow me to style, for example, the tags colors, so they would still be showing in a different color like on the XML. I've tried putting everything inside a but it just shows everything in black.

John Mulaney
  • 109
  • 9

1 Answers1

0

You can also try using xslt where you can define how you want to transform each XML tag to HTML.

https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcessor/Basic_Example

jahnavi13
  • 42
  • 4