Overview

As shown in the following image, I had the opportunity to display XML text data using Nuxt3, so this is a memo.

Installation

I used the following two libraries.

nnppmmiixhmilg-hfloirgmhatt.tjesr

Usage

I created the following file as a Nuxt3 component. It formats XML strings with xml-formatter and then applies syntax highlighting with highlight.js.

<iiii}c}co}c}<<p}smmmno)on)o;/t/sr/cppptxnx;nMf;nr}se<ttewwwwwsroooemsmsose)cmpeyhhhhotirrrrltlturttif;rprml{iiiiryptttf::n``muniilepettttdltapfthfafrdlpal>eeee-eh"fcsr"oeiotonetttca----w>slhoeto"rdgrtrne>eltssssrejirrp,m(hmemftr>aeppppatsgmPisa(ladaoa:s>aaaapuharnt)itXtrtscccc:pfltog=tgtMXmi(=eeeeritp;e=heLMaon"::::blogeTwd>td.LtnopramhryiXAXvt:dap--entptM{uMa=ee-rmpag".fehLtLlr")4peor-k=hjrDo`u(("r-zep-"is{e=`exx=ew--rwtgmfmm">rpweoshsar=ll,-arr-r"lt"uessnhpeawd>iyxlfhttot;-pr;glmt<lrrdmw;ahelssjiielrpts-(tsnn.=a;./fdr.ggt"pjxoeih:,yfC;IscrfnipoSOn"omiggs{erSpt;dan>htmeOeete(lr!a3rpr.tP"ii=tMaencer"gn=tresro)hgez4ats"p;t)"di-";sACXl67E;<u=oMlxPt>mLaprom",lo({e>opfn<1rTot/9eyr"p9rpm,r9eae5>t>.(X5)M2+,L0(0{p2rops.xml)).value;

Summary

I hope this is helpful for visualizing TEI/XML data.