How to convert CSV or XML to XACML?

57 Views Asked by At

I have a csv file, like this picture

file csv role with the persmission

then I've changed it to xml like this

<Row>
    <role>role:siasn-instansi:profilasn:viewprofil</role>
    <permission>[{&quot;url&quot;: &quot;/tampilanData/pns, &quot;label&quot;: &quot;Profile Pegawai, &quot;subMenu&quot;: &quot;pns&quot;}, {&quot;url&quot;: &quot;/tampilanData/pppk, &quot;label&quot;: &quot;Profile Pegawai PPPK, &quot;subMenu&quot;: &quot;pppk&quot;}, {&quot;url&quot;: &quot;/tampilanData/JPTNonASN, &quot;label&quot;: &quot;Profile Pegawai PPT Non-ASN, &quot;subMenu&quot;: &quot;ppt&quot;}]</permission>
</Row>

so can someone tell me how to convert to xacml? thank you

1

There are 1 best solutions below

0
cdan On

You can use XSLT. The string in your <permission> element looks like a JSON array. So you should use XSLT 3.0 with function fn:json-to-xml() function in your XSLT stylesheet.