是否可以在 Visual Studio 2010 项目中存储实际的 XML 文件,然后在代码中引用它?
IE。我可以存储一个 XML 文件(参见下面的片段),然后在 XML 数据中引用数据元素吗?如何做到这一点以及如何使用 C# 或 VB 代码引用 XML 数据深处的数据元素?
如果将XML文件添加到项目中,编译时会嵌入到DLL或EXE中吗?如果没有,如何将其嵌入到 DLL 或 EXE 中?
<readReferenceDataResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<readReferenceDataResult xmlns="http://test.website.com/hi/xsd/providermessages/ReadReferenceData/5.6.9">
<elementReferenceValues>
<elementName>organisationTypeCode</elementName>
<referenceSet>
<referenceCode xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9">1678</referenceCode>
<referenceDescription xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9">Accupuncture and Eastern Medicine</referenceDescription>
</referenceSet>
<referenceSet>
<referenceCode xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9">6454</referenceCode>
<referenceDescription xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9">Technical and Laboratory Services</referenceDescription>
</referenceSet>
<referenceSet>
<referenceCode xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9">9782</referenceCode>
<referenceDescription xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9">Naturopathy and Natural Health</referenceDescription>
</referenceSet>
<referenceSet>
<referenceCode xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9>8557</referenceCode>
<referenceDescription xmlns="http://test.website.com/hi/xsd/providercore/Elements/5.6.9">Aged Care Services</referenceDescription>