|
|
|||||||||||||||||
| hitta allt du behöver på Annonsera.se | |||
|
• Annonsera.se
» Documentation
» Ad Import Tool
Ad import toolTool hosted on Annonsera.se site which allows users to import ads from different formats into own account. It's available after you login on this page. HighlightsCharsetImport files must be in UTF-8 charset without BOM. If your file is in different charset, please convert it before submission. It's a good idea to validate your XML file before submission. Online validators: http://www.w3schools.com/XML/xml_validator.asp, http://www.xmlvalidation.com/ Multi-line textIf CSV is used, make sure that multi-line fields are enclosed in quotes. Sample: Some;Text;"Line 1 Line 2" Quotes within text must be escaped with double-quotes. FieldsList of fields that can be used to describe an ad in import file:
File formatsAds can be imported from files in CSV (.csv, .txt) or XML (.xml) formats. CSV. File structureField value must be separated from the next with a semicolon character (;) like in next example: title;price;type Field value can be enclosured with a double-quote character ("). It allows you to use line breaks and field separator character in field value. Example: Some;Text;"Line breaks and semicolons ; can be used here" Fields with embedded double-quote characters must be enclosed within double-quote characters, and each of the embedded double-quote characters must be represented by a pair of double-quote characters. Example: Ford E350;"Super ""luxurious"" truck" The 1-st row of the CSV import file must describe the sequence of fields in next rows. Such structure gives you more flexibility in describing ads in import file and lets you to be not tied to a field sequence and a count of optional fields. Here are some examples. Example A: title;price;type Apple;2;sell Pear;3;buy The 1-st row tells that in next 2 lines an each ad is described in such sequence: First goes its title (Apple, Pear), than its price (2, 3) and than a type of an ad (sell, buy). Example B: type;title;price sell;Apple;2 buy;Pear;3 The 1-st row tells that in next 2 lines an each ad is described in such sequence: First goes a type of an ad (sell, buy), than its title (Apple, Pear) and than its price (2, 3). NOTE: Previous examples are not valid to import. They are shortened and fictional to let you understand specific principles of writing import files. CSV. ExampleSamples of CSV fileYou may use this file as basis for your own import files. It can be opened with Excel, OpenOffice or other kind of spreadsheet editing software. Sample Excel fileImportant! This file must be first converted to CSV: 1. Open file in Excel 2. Run "Save as" and choose CSV (coma separated values) format. 3. Excel saves in local charsets. Most probably your file will be saved in Western European charset (iso-8859-1). You will need to convert it to UTF-8. This may be done using any online of desktop converter. For example using this online converter. 4. Upload CSV file Sample OpenOffice Spreadsheet fileImportant! This file must be first converted to CSV: 1. Open file in OpenOffice 2. Run "Save as" and choose CSV (coma separated values) format. On the next step choose Character Set: UTF-8, Field delimiter ;, Text delimiter: ". 3. That's it. Upload resulting CSV file CSV text samplecity;category;title;description;price;imageUrl;term;phone Norrbotten/Pajala;Bostad/Utland;Tomato;The red tomato.;5;http://farm4.static.flickr.com/3519/3773953521_3cdec661eb.jpg;3;0634578912 Jämtland/Östersund;Bostad/Utland;Cucumber;The green cucumber.;3;http://farm5.static.flickr.com/4007/4432871243_fae6782870.jpg;6;0984554381 XML. File structureEach XML import file must has similar structure: <?xml version="1.0" encoding="UTF-8" ?> <ads> <ad> <!-- Ad_1 fields here. --> </ad> <!-- As many ads as you need. --> <ad> <!-- Ad_n fields here. --> </ad> </ads>
<?xml version="1.0" encoding="UTF-8" ?> <ads> <ad> <title>XML CDATA</title> <description><![CDATA[There can be line breaks as many as we need. And corner chars (< and > and </) also can be here.]]></description> <price>5</price> </ad> </ads> NOTE: Previous examples are not valid to import. They are shortened and fictional to let you understand specific principles of writing import files. XML. Example<?xml version="1.0" encoding="UTF-8" ?> <ads> <ad> <city>Norrbotten/Pajala</city> <category>Bostad/Utland</category> <title>Tomato</title> <description>The red tomato.</description> <price>5</price> <imageUrl>http://farm4.static.flickr.com/3519/3773953521_3cdec661eb.jpg</imageUrl> <term>3</term> <phone>0634578912</phone> </ad> <ad> <city>Jämtland/Östersund</city> <category>Bostad/Utland</category> <title>Cucumber</title> <description>The green cucumber.</description> <price>3</price> <imageUrl>http://farm5.static.flickr.com/4007/4432871243_fae6782870.jpg</imageUrl> <term>6</term> <phone>0984554381</phone> </ad> </ads> Got a Question?Contact us at clientapi@annonsera.se See also | |||
|
|||
|
|
|||