1
0
mirror of https://github.com/akpaevj/executor-scripts.git synced 2024-11-24 08:52:35 +02:00
akpaevj-executor-scripts/Common/Xml.sbsl
akpaevj 3085ea8f5c d
2024-03-05 00:15:53 +03:00

17 lines
436 B
Plaintext

@Global
method GetValue(FilePath: String, Path: String, Namespace: String = ""): String?
val Reader = new XmlReader(FilePath)
return GetValue(Reader, Path, Namespace)
;
@Global
method GetValue(Reader: XmlReader, Path: String, Namespace: String = ""): String?
Path.Split(",").ForEach(c -> Reader.NextTo(c.Trim(), Namespace))
Reader.Next()
if Reader.HasValue
return Reader.Value
;
return Undefined
;