You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ive been trying out this package for a couple of days now, I have some XML files at work that I need to handle in a more python native way. One section of the XML looks something like this:
I tried defining a model with raw elements, as detailed in the docs, the next step would've been creating a model from each element, but I first wanted to see if the parser managed to find these elements and it didn't. Here's my example code:
Instead of the wildcard, I tried using all sorts of patterns, weird thing is, if i write the name of the first element it matches, but any other element it doesnt. meaning if i change tag to Value1 it matches but Value2 doesnt. Furthermore if I change all of the tags to the same name then it returns the full list.
Anybody have any idea? Would really appreciate any help, thank you!
Python version v3.12.4
Pydantic version v2.12.2
Pydantic-xml version v2.18.0
I'm having a hard time understanding how I would handle such data, Needs to support N nested sections, or is it a known limitation? Do you have any ideas of how I could tackle this?
Are pattern matches planned anytime in the future?
Activity
dapper91 commentedon Oct 15, 2025
@PuglyD Hi,
element tag doesn't support wildcards, it must be an explicit tag name
PuglyD commentedon Oct 19, 2025
Hey @dapper91 , thanks for clarifying!
I'm having a hard time understanding how I would handle such data, Needs to support N nested sections, or is it a known limitation? Do you have any ideas of how I could tackle this?
Are pattern matches planned anytime in the future?