Documentation
¶
Index ¶
- Variables
- func CountHeadSpace(s string, nGrp int) int
- func ExtractOA(xml, obj, path string, lvl int) string
- func Hierarchy(searchArea string, lvl int, hierarchy *[]string)
- func Indent(str string, n int, ign1stLn bool) (string, bool)
- func InitOAs(SIFSpecPath string, tblSep, pathSep string)
- func JSON2SIF(cfgPath, json, SIFVer string) (sif, sv string, err error)
- func JSON2SIF3RD(jsonstr string) string
- func JSON2SIF4LF(json string) (string, map[string]string)
- func JSON2SIFRepl(xml string, mRepl map[string]string) string
- func JSON2SIFSpec(xml, SIFSpecPath string) string
- func NextAttr(obj, fullpath string) (value string, end bool)
- func PrintXML(paper, line, mark string, iLine int, tag string) (string, bool)
- func SearchTagWithAttr(xml string) (posGrp [][2]int, pathGrp []string, mAttrGrp []map[string]string, root string)
- func SortSimpleObject(xml, obj string, level int, trvsPath string) (paper string)
- func TagFromXMLLine(line string) (tag string, mKeyAttr map[string]string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TrvsGrpViaSpec []string // from SIF Spec RewindAttrIter = func() { for k := range mPathAttrIdx { mPathAttrIdx[k] = 0 } } ResetPrt = func() { mOAPrtLn = make(map[string]int) } ResetAll = func() { mObjIdxStart = make(map[string]int) mObjIdxEnd = make(map[string]int) mOAPrtLn = make(map[string]int) mIPathSubXML = make(map[string]string) mIPathSubMark = make(map[string]string) mPathIdx = make(map[string]int) } )
Functions ¶
func InitOAs ¶
InitOAs : fill TrvsGrpViaSpec & [mPathAttrs] & [mPathAttrIdx]
func JSON2SIF3RD ¶
JSON2SIF3RD : via 3rd lib converter, return Disordered, Formatted XML
func JSON2SIF4LF ¶
JSON2SIF4LF : if JSON fields have special (LF, TBL), pick them up for later replacement
func JSON2SIFRepl ¶
JSON2SIFRepl : Pieces Replaced, should be almost identical to Original SIF
func JSON2SIFSpec ¶
JSON2SIFSpec : Ordered, Some pieces are different
func SearchTagWithAttr ¶
func SearchTagWithAttr(xml string) (posGrp [][2]int, pathGrp []string, mAttrGrp []map[string]string, root string)
SearchTagWithAttr : where (get line from xml), tag-path (get info from spec), attribute-map (re-order attributes, reconstruct line)
func SortSimpleObject ¶
SortSimpleObject : xml is 4 space formatted, level is obj level obj [level] = attribute [level-1] NextAttr is available
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.