I work on asp.net core 7 razor page model . I need to use config file appsettings.json to get value of <barcode> tag
inside barcode i will get tag <nrprinter> and inside tag <nrprinter> I will get text inside <para> tag
so file DefaultValues.xml content as below :
<barcode>
<whprinter>
<para>^XA~TA000~JSN^LT0^MNM^MTD^PON^PMN^LH0,0^JMA^PR2,2^MD18^JUS^LRN^CI0^XZ</para>
<para>^XA</para>
<para>^MMT</para>
<para>^LL0184</para>
<para>^PW320</para>
<para>^LS0</para>
<para>^PA1,1,1,1</para>
<para>^JUS</para>
<para>^BY1,3,58^FT250,17^BCI,,N,N</para>
<para>^FD>:VARbarcode^FS</para>
<para>^FT220,1^A0I,20,20^FH\^FDVARFont^FS</para>
<para>^PQVARQty,0,1,Y^XZ</para>
<para/>
</whprinter>
<nrprinter>
<para>^XA~TA000~JSN^LT0^MNM^MTD^PON^PMN^LH0,0^JMA^PR2,2^MD18^JUS^LRN^CI0^XZ</para>
<para>^XA</para>
<para>^MMT</para>
<para>^LL0184</para>
<para>^PW320</para>
<para>^LS0</para>
<para>^PA1,1,1,1</para>
<para>^JUS</para>
<para>^FT249,88^A0I,25,24^FH\^FDPRICE: VARPrice^FS</para>
<para>^BY1,3,58^FT250,17^BCI,,N,N</para>
<para>^FD>:VARbarcode^FS</para>
<para>^FT220,1^A0I,20,20^FH\^FDVARFont^FS</para>
<para>^PQVARQty,0,1,Y^XZ</para>
<para/>
</nrprinter>
</barcode>
and expected result i need to get is :
^XA~TA000~JSN^LT0^MNM^MTD^PON^PMN^LH0,0^JMA^PR2,2^MD18^JUS^LRN^CI0^XZ^XA^MMT^LL0184^PW320^LS0^PA1,1,1,1^JUS^FT249,88^A0I,25,24^FH\^FDPRICE: VARPrice^FS^BY1,3,58^FT250,17^BCI,,N,N^FD>:VARbarcode^FS^FT220,1^A0I,20,20^FH\^FDVARFont^FS^PQVARQty,0,1,Y^XZ
so please how to define key and value on appsettings.json and how to get value of text inside barcode-nprinter-para by csharp ?