5 Star 15 Fork 2

xuri / xgen

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
xmlInclude.go 820 Bytes
一键复制 编辑 原始数据 按行查看 历史
// Copyright 2020 - 2021 The xgen Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
//
// Package xgen written in pure Go providing a set of functions that allow you
// to parse XSD (XML schema files). This library needs Go version 1.10 or
// later.
package xgen
import "encoding/xml"
// OnInclude handles parsing event on the include start elements. The list
// element defines a simple type element as a list of values of a specified
// data type.
func (opt *Options) OnInclude(ele xml.StartElement, protoTree []interface{}) (err error) {
for _, ele := range ele.Attr {
if ele.Name.Local == "schemaLocation" {
if _, ok := opt.IncludeMap[ele.Value]; ok {
continue
}
opt.IncludeMap[ele.Value] = true
}
}
return
}
Go
1
https://gitee.com/xurime/xgen.git
git@gitee.com:xurime/xgen.git
xurime
xgen
xgen
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891