У меня есть xml-файл, такой как this
<test-run id="2" duration="508.56199999999995" testcasecount="5" total="5" passed="5" failed="0" inconclusive="0" skipped="0" result="Passed" start-time="2019-01-25T 15:40:27Z" end-time="2019-01-25T 15:43:20Z">
<test-suite type="Assembly" name="Spok.Messaging.UITests.dll" fullname="c:\jenkins\workspace\SpokSTA\CCP.Messaging.Web.Automation.Adhoc\tests\Spok.Messaging.UITests\bin\Debug\netcoreapp2.1\Spok.Messaging.UITests.dll" total="5" passed="5" failed="0" inconclusive="0" skipped="0" result="Passed" duration="508.56199999999995">
<test-suite type="TestSuite" name="Spok" fullname="Spok" total="5" passed="5" failed="0" inconclusive="0" skipped="0" result="Passed" duration="508.56199999999995">
<test-suite type="TestSuite" name="Messaging" fullname="Spok.Messaging" total="5" passed="5" failed="0" inconclusive="0" skipped="0" result="Passed" duration="508.56199999999995">
<test-suite type="TestSuite" name="UITests" fullname="Spok.Messaging.UITests" total="5" passed="5" failed="0" inconclusive="0" skipped="0" result="Passed" duration="508.56199999999995">
<test-suite type="TestSuite" name="WebMessaging" fullname="Spok.Messaging.UITests.WebMessaging" total="5" passed="5" failed="0" inconclusive="0" skipped="0" result="Passed" duration="508.56199999999995">
<test-suite type="TestFixture" name="ComposeContainerTests" fullname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests" total="4" passed="4" failed="0" inconclusive="0" skipped="0" result="Passed" duration="387.448">
<test-case name="Test_Compose_MessageToSingleContact" fullname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests.Test_Compose_MessageToSingleContact" methodname="Test_Compose_MessageToSingleContact" classname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests" result="Passed" duration="92.018" asserts="0">
<properties>
<property name="ParallelScope" value="All" />
<property name="LevelOfParallelism" value="4" />
<property name="CodeBeamer" value="18160" />
<property name="TestId" value="121018123964" />
<property name="BrowserCount" value="1" />
<property name="UserCount" value="2" />
</properties>
<output>Some Output</output>
</test-case>
<test-case name="Test_Compose_AddThenRemoveRecipients" fullname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests.Test_Compose_AddThenRemoveRecipients" methodname="Test_Compose_AddThenRemoveRecipients" classname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests" result="Passed" duration="112.154" asserts="0">
<properties>
<property name="ParallelScope" value="All" />
<property name="LevelOfParallelism" value="4" />
<property name="CodeBeamer" value="10085" />
<property name="TestId" value="153859944702" />
<property name="BrowserCount" value="1" />
<property name="UserCount" value="4" />
</properties>
<output>Some Output</output>
</test-case>
<test-case name="Test_Compose_MessageToMultipleContact" fullname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests.Test_Compose_MessageToMultipleContact" methodname="Test_Compose_MessageToMultipleContact" classname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests" result="Passed" duration="114.37899999999999" asserts="0">
<properties>
<property name="ParallelScope" value="All" />
<property name="LevelOfParallelism" value="4" />
<property name="CodeBeamer" value="18160" />
<property name="TestId" value="121018123940" />
<property name="BrowserCount" value="1" />
<property name="UserCount" value="3" />
</properties>
<output>Some Output</output>
</test-case>
<test-case name="Test_Compose_SearchForAndAddMultipleRecipientsToNewMessage" fullname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests.Test_Compose_SearchForAndAddMultipleRecipientsToNewMessage" methodname="Test_Compose_SearchForAndAddMultipleRecipientsToNewMessage" classname="Spok.Messaging.UITests.WebMessaging.ComposeContainerTests" result="Passed" duration="68.896999999999991" asserts="0">
<properties>
<property name="ParallelScope" value="All" />
<property name="LevelOfParallelism" value="4" />
<property name="CodeBeamer" value="18163" />
<property name="TestId" value="121018131646" />
<property name="BrowserCount" value="1" />
<property name="UserCount" value="4" />
</properties>
<output>Some Output</output>
</test-case>
</test-suite>
<test-suite type="TestFixture" name="ThreadContainerTests" fullname="Spok.Messaging.UITests.WebMessaging.ThreadContainerTests" total="1" passed="1" failed="0" inconclusive="0" skipped="0" result="Passed" duration="121.11399999999999">
<test-case name="Test_Thread_MessageBetweenTwoUsers" fullname="Spok.Messaging.UITests.WebMessaging.ThreadContainerTests.Test_Thread_MessageBetweenTwoUsers" methodname="Test_Thread_MessageBetweenTwoUsers" classname="Spok.Messaging.UITests.WebMessaging.ThreadContainerTests" result="Passed" duration="121.11399999999999" asserts="0">
<properties>
<property name="ParallelScope" value="All" />
<property name="LevelOfParallelism" value="4" />
<property name="CodeBeamer" value="18160" />
<property name="TestId" value="121018123962" />
<property name="BrowserCount" value="2" />
<property name="UserCount" value="2" />
</properties>
<output>Some Output</output>
</test-case>
</test-suite>
</test-suite>
</test-suite>
</test-suite>
</test-suite>
<errors />
</test-suite>
Я пытаюсь сопоставить это с java-объектами, следуя этому примеру.
Я хотел бы знать, можно ли пропустить некоторые родительские теги n xml при отмене маршалинга.Как и в примере XML, я просто хочу данные в тегах <test-case></test-case>
.Есть несколько ненужных родительских тегов, которые мне нужны для создания классов моделей, которые мне не нужны.
Также есть онлайн-инструмент, в котором я могу создать схему для своих классов моделей на основе строки XML.