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

17 lines
436 B
Plaintext
Raw Permalink Normal View History

2024-02-29 21:18:18 +02:00
@Global
2024-03-04 23:15:53 +02:00
method GetValue(FilePath: String, Path: String, Namespace: String = ""): String?
val Reader = new XmlReader(FilePath)
return GetValue(Reader, Path, Namespace)
;
2024-02-29 21:18:18 +02:00
2024-03-04 23:15:53 +02:00
@Global
method GetValue(Reader: XmlReader, Path: String, Namespace: String = ""): String?
Path.Split(",").ForEach(c -> Reader.NextTo(c.Trim(), Namespace))
2024-02-29 21:18:18 +02:00
Reader.Next()
if Reader.HasValue
return Reader.Value
;
return Undefined
;