mirror of
https://github.com/akpaevj/executor-scripts.git
synced 2024-11-24 08:52:35 +02:00
17 lines
436 B
Plaintext
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
|
|
; |