我在两个文件中都有ID为基本属性的基本文件和查找文件。 我想编写C#代码以读取具有ID的基本文件,并根据订阅者查找文件,创建2个XML文件,文件名分别为_USA和_CAD
基本文件:
Base File Name : Base_File.xml
<?xml version="1.0" encoding="utf-8"?>
<Publication >
<Payload >
<BaseList >
<Base>
<Custom>
<CustomE>
<ML_BUY_SELL_FLAG>false</ML_BUY_SELL_FLAG>
<ID_BB_GLOBAL_PARENT_COMPANY_NAME>First Trust /USA</ID_BB_GLOBAL_PARENT_COMPANY_NAME>
</CustomE>
</Custom>
<Identifier>
<ID>10072271</ID>
</Identifier>
</Base>
<Base>
<Custom>
<CustomE>
<ML_BUY_SELL_FLAG>false</ML_BUY_SELL_FLAG>
<ID_BB_GLOBAL_PARENT_COMPANY_NAME>First Trust /CAD</ID_BB_GLOBAL_PARENT_COMPANY_NAME>
</CustomE>
</Custom>
<Identifier>
<ID>10072272</ID>
</Identifier>
</Base>
</BaseList>
</Payload>
</Publication>
查找文件:
Look-Up File Name: LookUp.xml
<?xml version="1.0" encoding="utf-8"?>
<Publication >
<Payload >
<SubsList >
<Subscription>
<ID>10072271</ID>
<Subscribers>
<Subscriber>USA</Subscriber>
</Subscribers>
</Subscription>
<Subscription>
<ID>10072272</ID>
<Subscribers>
<Subscriber>CAD</Subscriber>
</Subscribers>
</Subscription>
</SubsList>
</Payload>
</Publication>