XML conversion of array format
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 } }