Browse Source

One line XML file

Vova Tkach 5 years ago
parent
commit
412d11230b
1 changed files with 12 additions and 12 deletions
  1. 12 12
      modules/module_api_xml.go

+ 12 - 12
modules/module_api_xml.go

@@ -225,16 +225,16 @@ func (this *Modules) api_GenerateXmlOffers(wrap *wrapper.Wrapper) string {
 }
 
 func (this *Modules) api_GenerateXml(wrap *wrapper.Wrapper) string {
-	return `<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE yml_catalog SYSTEM "shops.dtd">
-<yml_catalog date="` + time.Unix(int64(time.Now().Unix()), 0).Format("2006-01-02 15:04") + `">
-	<shop>
-		<name>` + html.EscapeString((*wrap.Config).API.XML.Name) + `</name>
-		<company>` + html.EscapeString((*wrap.Config).API.XML.Company) + `</company>
-		<url>` + html.EscapeString((*wrap.Config).API.XML.Url) + `</url>
-		<currencies>` + this.api_GenerateXmlCurrencies(wrap) + `</currencies>
-		<categories>` + this.api_GenerateXmlCategories(wrap) + `</categories>
-		<offers>` + this.api_GenerateXmlOffers(wrap) + `</offers>
-	</shop>
-</yml_catalog>`
+	return `<?xml version="1.0" encoding="UTF-8"?>` +
+		`<!DOCTYPE yml_catalog SYSTEM "shops.dtd">` +
+		`<yml_catalog date="` + time.Unix(int64(time.Now().Unix()), 0).Format("2006-01-02 15:04") + `">` +
+		`<shop>` +
+		`<name>` + html.EscapeString((*wrap.Config).API.XML.Name) + `</name>` +
+		`<company>` + html.EscapeString((*wrap.Config).API.XML.Company) + `</company>` +
+		`<url>` + html.EscapeString((*wrap.Config).API.XML.Url) + `</url>` +
+		`<currencies>` + this.api_GenerateXmlCurrencies(wrap) + `</currencies>` +
+		`<categories>` + this.api_GenerateXmlCategories(wrap) + `</categories>` +
+		`<offers>` + this.api_GenerateXmlOffers(wrap) + `</offers>` +
+		`</shop>` +
+		`</yml_catalog>`
 }