Commit Graph

11 Commits

Author SHA1 Message Date
ionutboangiu
87044d7c9d Add comments for XmlProvider and xml_root_path opt 2023-10-16 13:31:14 +03:00
ionutboangiu
dd82bb3c4b Add sanity check to prevent xml reader panic
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).

If the prefix is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. 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.

Added an integration tes for the special case where the
xml_root_path field is left empty. Before the change it
used to trim the root element from the path slice when
attempting to retrieve a the relative path slice.
2023-10-16 13:31:14 +03:00
ionutboangiu
82468c580d Replace deprecated ioutil library, remove redundant statements + small optimizations 2022-12-02 14:24:18 +02:00
adi
1fe0dcbe9a Changed FileName variable for ers 2022-11-20 18:46:36 +01:00
Trial97
2c53180ac8 Fixed agents unit tests 2020-05-07 11:19:03 +02:00
TeoV
a5a74a9a91 Correctly populate ConcurrentRequest from config in EventReader fixes #1932 2020-02-18 14:24:10 +01:00
TeoV
b85ebe8214 Update EventReader integration tests 2020-02-05 15:57:58 +01:00
TeoV
52f0e0a86c Merge ContentFields,HeaderFields,TrailerFields into one Files 2020-01-29 14:40:57 +01:00
TeoV
26ea469328 Merge content,header,trailer fields into fields 2020-01-29 14:40:57 +01:00
TeoV
f74df27ddd Remove pathPrfx from xmlDP 2020-01-23 10:56:30 +02:00
TeoV
4ea9cd3a48 Add XML to EventReader and test for it 2020-01-11 14:52:37 +02:00