mxj icon indicating copy to clipboard operation
mxj copied to clipboard

XML conversion of array format

Open djxhhh opened this issue 3 months ago • 1 comments

hello When I used this package for XML conversion, I found that it could only retrieve or set one value for array data, not all values, when using paths to get or set values. Has this been optimized? Similar to this: type key struct { name string position int isArray bool isWildcard bool // Added wildcard identifier } // Handling wildcard cases if p[0] == "*" { newkey.isWildcard = true newkey.isArray = true ret = append(ret, newkey) continue }

// Handled full array retrieval if strings.HasSuffix(keys[i], "[]") { newkey.isWildcard = true newkey.isArray = true ret = append(ret, newkey) continue } if keys[i].isWildcard { // Iterate through the entire array for idx := range vals { // Process each element } }

djxhhh avatar Nov 14 '25 02:11 djxhhh