我想将节点从父节点复制到子节点。我不确定如何实现这一点。
我的源xml
<Root1>
<Family1>
<Childrens>
<Child>
<ChildFirstName>Robin1</ChildFirstName>
<ChildLastName>Jackman1</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
<Activities>
<Sports>
<Cricket>
<ParticipentNames>
</ParticipentNames>
</Cricket>
</Sports>
</Activities>
</Child>
<Child>
<ChildFirstName>Robin2</ChildFirstName>
<ChildLastName>Jackman2</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
<Activities>
<Sports>
<Cricket>
<ParticipentNames>
</ParticipentNames>
</Cricket>
</Sports>
</Activities>
</Child>
<Child>
<ChildFirstName>Robin3</ChildFirstName>
<ChildLastName>Jackman3</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
<Activities>
<Sports>
<Cricket>
<ParticipentNames>
</ParticipentNames>
</Cricket>
</Sports>
</Activities>
</Child>
</Childrens>
</Family1>
</Root1>
我想得到输出
<Root1>
<Family1>
<Childrens>
<Child>
<ChildFirstName>Robin1</ChildFirstName>
<ChildLastName>Jackman1</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
<Activities>
<Sports>
<Cricket>
<ParticipentNames>
<ChildFirstName>Robin1</ChildFirstName>
<ChildLastName>Jackman1</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
</ParticipentNames>
</Cricket>
</Sports>
</Activities>
</Child>
<Child>
<ChildFirstName>Robin2</ChildFirstName>
<ChildLastName>Jackman2</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
<Activities>
<Sports>
<Cricket>
<ParticipentNames>
<ChildFirstName>Robin2</ChildFirstName>
<ChildLastName>Jackman2</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
</ParticipentNames>
</Cricket>
</Sports>
</Activities>
</Child>
<Child>
<ChildFirstName>Robin3</ChildFirstName>
<ChildLastName>Jackman3</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
<Activities>
<Sports>
<Cricket>
<ParticipentNames>
<ChildFirstName>Robin3</ChildFirstName>
<ChildLastName>Jackman3</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
</ParticipentNames>
</Cricket>
</Sports>
</Activities>
</Child>
</Childrens>
</Family1>
</Root1>
我想要 XSLT 1.0 中的解决方案。
我想将这些节点复制到子节点
<ChildFirstName>Robin3</ChildFirstName>
<ChildLastName>Jackman3</ChildLastName>
<Address>
<Street1>Street1</Street1>
<State>State</State>
<Country>Country</Country>
</Address>
谢谢。