以下を返す WCF サービスがあります。
MessageContract
|
+-- List<TopLevelDataContract>
TopLevelDataContract
|
+-- FirstChildDataContract
+-- SecondChildDataContract
+-- ThirdChildDataContract
FirstChildDataContract
|
+-- FieldOne
+-- AnotherField
SecondChildDataContract
|
+-- FieldTwo
+-- YetAnotherField
ThirdChildDataContract
|
+-- FieldThree
+-- AndAnotherField
これらのデータコントラクトを SSRS で適切に表示するには、次のように表形式にフラット化する必要があります。
+----------+--------------+----------+-----------------+------------+-----------------+
| FieldOne | AnotherField | FieldTwo | YetAnotherField | FieldThree | AndAnotherField |
+----------+--------------+----------+-----------------+------------+-----------------+
... rows of data...
ただし、ElementPath
これを達成するための式/XMLDP クエリは、私たちを避けています。私たちは喜びなしで次のことを試しました:
FirstChildDataContract
タイプのすべての「行」を取得します。
<ElementPath IgnoreNamespaces="true"> MessageContract{}/TopLevelDataContracts{}/TopLevelDataContract{}/FirstChildDataContract{} </ElementPath>
- これはすべての子を取得しますが、未加工の XML 形式です。
<ElementPath IgnoreNamespaces="true"> MessageContract{}/TopLevelDataContracts{}/TopLevelDataContract{@} </ElementPath>
- これは(1)と同じです:
<ElementPath IgnoreNamespaces="true"> * </ElementPath>
ElementPath
可能であれば、これを達成するために使用する正しい表現は何ですか?
(余談ですが、Microsoft は、独自の XPath クエリ言語にほとんど似ていないものの、十分に文書化されていて柔軟な XPath を使用しなかったのはなぜですか?)