- Notifications
You must be signed in to change notification settings - Fork2
Parse, manipulate and build VAST files
License
NotificationsYou must be signed in to change notification settings
joeig/go-vast
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Go package to parse, manipulate and build Digital Video Ad Serving Templates (VAST).The currently supported version is VAST 4.2.
go get -u go.eigsys.de/go-vast
Theencoding/xml
package mergesCDATA
sections with surrounding text.This can lead to unexpected results when parsing VAST files.
Consider the following example:
<JavaScriptResource><![CDATA[https://verificationcompany1.com/verification_script1.js]]> </JavaScriptResource>
After parsingJavaScriptResource
, the value is:
\n https://verificationcompany1.com/verification_script1.js\n
If you need the content without the Unicode spaces, consider usingstrings.TrimSpace()
.For more information, see#43168.
A complete list of examples is available in thepackage reference.
package mainimport ("go.eigsys.de/go-vast")funcmain() {example:=vast.New()example.Version=vast.VAST42Version}
package mainimport ("go.eigsys.de/go-vast""log""os")funcmain() {handle,err:=os.Open("vast.xml")iferr!=nil {log.Fatalf("%v",err)}example,err:=vast.Read(handle)iferr!=nil {log.Fatalf("%v",err)}}
package mainimport ("go.eigsys.de/go-vast""log")funcmain() {example:=vast.New()exampleBytes,err:=example.Bytes()iferr!=nil {log.Fatalf("%v",err)}}
About
Parse, manipulate and build VAST files
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published