mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
HierarchyPath parser now returns nil when the path is empty (instead of a string slice with one EmptyString element). If isAbsolute is set to true, when calling the AsString method on a nil HierarchyPath, only the separator will be returned. Alternatively, if isAbsolute is false, it will just return . to signal that the path currently being processed is the one required.This avoids a nil expr error coming from the xmlquery library. Use the Query and QueryAll functions from the xmlquery package to be able to handle the errors ourselves and avoid panics. Remove config default value for xmlRootPath. The field will remain commented in config_defaults for reference. Add tests for HierarchyPath.AsString function. Add comments for XmlProvider and xmlRootPath opt. Update XmlProvider String() func based on the comment which specifies that it should display the already parsed values out of cache.