Позвольте мне попытаться объяснить как можно яснее, что именно я имею в виду под этим вопросом.
XML выглядит так
<Books>
<Book id="1">
<title>Circumference</title>
<author>Nicholas Nicastro</author>
<summary>Eratosthenes and the Ancient Quest to Measure the Globe.</summary>
</Book>
<Book id="2">
<title>Copernicus Secret</title>
<author>Jack Repcheck</author>
<summary>How the scientific revolution began</summary>
</Book>
</Books>
Это будет выглядеть так
<Books>
<Book id="1">
<title>Circumference</title>
<author>Nicholas Nicastro</author>
<summary id ='1'>Eratosthenes and the Ancient Quest to Measure the Globe.</summary>
<summary id ='2'>Eratosthenes more info in another tag.</summary>
<summary id ='3'>Eratosthenes and again another tag.</summary>
<summary id ='4'>Eratosthenes and the final tag another one here</summary>
</Book>
<Book id="2">
<title>Copernicus Secret</title>
<author>Jack Repcheck</author>
<summary id ='1'>How the scientific revolution began</summary>
<summary id ='2'>Eratosthenes more info in another tag.</summary>
<summary id ='3'>Eratosthenes and again another tag.</summary>
<summary id ='4'>Eratosthenes and the final tag another one here</summary>
</Book>
</Books>
Теперь, если я буду следовать инструкции на сайте, указанном выше, это не объясняет, как обрабатывать сводку 2,3,4 (XML, который мне нужно проанализировать, выглядит так) и как я могу показать их вывод. Все, что я получу, это последняя строка. Кто-нибудь имеет представление о том, как я могу получить другие (имея в виду 2,3, в этом случае кажется, что он показывает только последний, так как это, вероятно, последний в currentElementValue).
Я немного запутался, должен ли я также обратиться к этому атрибуту или мне нужно создать новый поисковый тег в моем парсере?