使用多个 headers Talend 解析 xml
Parsing xml with multiple headers Talend
我正在尝试读取 xml 收到的数据,其中有多个 header
示例:
<?xml version="1.0" encoding="utf-8"?>
<RepeaterData>
<Version />
<Items>
<Item>
<year>2017</year>
<Additional>
<?xml version="1.0" encoding="utf-8"?>
<RepeaterData>
<Version />
<Items>
<Name>toto</Nom>
</Items>
</RepeaterData>
</AdditionalCharge>
</Item>
<Item>
<year>2018</year>
<Additional >
<?xml version="1.0" encoding="utf-8"?>
<RepeaterData>
<Version />
<Items>
<Item>
<element type="System.String">3</Sousdept>
<Name type="System.String">toto</Nom>
</Item>
<Item>
<element type="System.String">3</Sousdept>
<Name type="System.String">tata</Nom>
</Item>
</Items>
</RepeaterData>
</Additional>
</Item>
</Items>
我也尝试用 StringHandling.EREPLACE ( b ,"<?xml version=1.0 encoding=utf-8?>","");
删除 xml header 但它不起作用
请帮忙!!!!
我正在尝试读取 xml 收到的数据,其中有多个 header
示例:
<?xml version="1.0" encoding="utf-8"?>
<RepeaterData>
<Version />
<Items>
<Item>
<year>2017</year>
<Additional>
<?xml version="1.0" encoding="utf-8"?>
<RepeaterData>
<Version />
<Items>
<Name>toto</Nom>
</Items>
</RepeaterData>
</AdditionalCharge>
</Item>
<Item>
<year>2018</year>
<Additional >
<?xml version="1.0" encoding="utf-8"?>
<RepeaterData>
<Version />
<Items>
<Item>
<element type="System.String">3</Sousdept>
<Name type="System.String">toto</Nom>
</Item>
<Item>
<element type="System.String">3</Sousdept>
<Name type="System.String">tata</Nom>
</Item>
</Items>
</RepeaterData>
</Additional>
</Item>
</Items>
我也尝试用 StringHandling.EREPLACE ( b ,"<?xml version=1.0 encoding=utf-8?>","");
删除 xml header 但它不起作用
请帮忙!!!!