-
Notifications
You must be signed in to change notification settings - Fork 0
/
bmecat.go
36 lines (30 loc) · 1.1 KB
/
bmecat.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package bmecat
import "encoding/xml"
const (
XMLNS string = "http://www.bmecat.org/bmecat/2005/bmecat_new_catalog"
XMLNSXSI string = "http://www.w3.org/2001/XMLSchema-instance"
XSI string = "http://www.bmecat.org/bmecat/2005 bmecat_2005.xsd"
)
type BMEcat2005 struct {
XMLName xml.Name `xml:"BMECAT"`
XMLNS string `xml:"xmlns,attr"`
XMLNSXSI string `xml:"xmlns:xsi,attr"`
XSI string `xml:"xsi,attr"`
Version string `xml:"version,attr"`
Header Header `xml:"HEADER"`
NewCatalog TNewCatalog `xml:"T_NEW_CATALOG"`
UpdateProducts *TUpdateProducts `xml:"T_UPDATE_PRODUCTS"`
UpdatePrice *TUpdatePrice `xml:"T_UPDATE_PRICE"`
}
func NewBMEcat2005(header Header, catalog TNewCatalog, updateProduct *TUpdateProducts, updatePrice *TUpdatePrice, xmlns string, xmlnsxsi string, xsi string, version string) *BMEcat2005 {
return &BMEcat2005{
Header: header,
XMLNS: xmlns,
XMLNSXSI: xmlnsxsi,
XSI: xsi,
Version: version,
NewCatalog: catalog,
UpdateProducts: updateProduct,
UpdatePrice: updatePrice,
}
}