mirror of
https://github.com/kerberos-io/onvif.git
synced 2025-10-08 01:00:13 +08:00
api: add single tags support
This commit is contained in:
@@ -166,7 +166,7 @@ func xmlAnalize(methodStruct interface{}, acceptedData* string) (*string, error)
|
|||||||
}
|
}
|
||||||
el.AddChild(pushTmp)
|
el.AddChild(pushTmp)
|
||||||
el = pushTmp
|
el = pushTmp
|
||||||
} else if mas[idntIndex] == "PushPop" { //done
|
} else if mas[idntIndex] == "PushPop" {
|
||||||
popTmp := etree.NewElement(elemName)
|
popTmp := etree.NewElement(elemName)
|
||||||
popTmp.SetText(value)
|
popTmp.SetText(value)
|
||||||
if len(attr) != 0 {
|
if len(attr) != 0 {
|
||||||
@@ -174,7 +174,11 @@ func xmlAnalize(methodStruct interface{}, acceptedData* string) (*string, error)
|
|||||||
popTmp.CreateAttr(key, value)
|
popTmp.CreateAttr(key, value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if el == nil {
|
||||||
|
el = document.CreateElement(elemName)
|
||||||
|
} else {
|
||||||
el.AddChild(popTmp)
|
el.AddChild(popTmp)
|
||||||
|
}
|
||||||
} else if mas[idntIndex] == "Pop" {
|
} else if mas[idntIndex] == "Pop" {
|
||||||
el = el.Parent()
|
el = el.Parent()
|
||||||
lstIndex -= 1
|
lstIndex -= 1
|
||||||
|
Reference in New Issue
Block a user