- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 05:40 AM - edited 01-27-2025 05:45 AM
Then your example XML is invalid, as an XML file has only one root element. Meaning, Message can only be there once. If Message is your row, then there needs to be another root element, e.g:
<Messages>
<Message>
<Attribute>1</Attribute>
<Attribute>2</Attribute>
</Message>
</Messages>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 05:50 AM
I'm not sure what your concern is. I could've encapsulated the whole thing in another root element but we receive XML files with one row per file so there is no need for a root element.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 06:14 AM - edited 01-27-2025 06:18 AM
Let me rephrase it. You can't use Message as the rowTag, because it's the root element. rowTag implies that it's a tag within the root element, which might occur multiple times. Check the docs around reading and write XML files, there you'll find examples which include a root tag (books) and row tags (book). If you check on this page the docs of from_xml, you'll see that "rowTag option is not applicable" due the exact same reason: You read just a single record.
To solve your issue, you either need to introduce another root tag (which I read is not an option for you), or to find another row tag, which might be Attribute. I hope it helps!