I have the following XML that I transformed using EDIFabric from and EDI file to XML.
<?xml version="1.0" encoding="UTF-8"?>
<M_856 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="www.edifabric.com/x12">
<S_N3>
<D_166_1>UNION SQUARE IND PK</D_166_1>
<D_166_2>909 KATIE COURT</D_166_2>
</S_N3>
<S_N4>
<D_19_1>Harrisburg</D_19_1>
<D_156_2>PA</D_156_2>
<D_116_3>17109</D_116_3>
<D_26_4>US</D_26_4>
</S_N4>
<S_SE>
<D_96_1>22</D_96_1>
<D_329_2>1845</D_329_2>
</S_SE>
</M_856>
I would like to extract all S_N4 nodes as follows:
<City>Harrisburg</City>
<State>PA</State>
<PostalCode>17109</PostalCode>
<Country>US</Country>
what is the XSLT transformation required?
The below would do, rename Root to whatever your root is: