Struttura del catalogo (XML)
- C’è un nodo di apertura e chiusura dell’intero catalogo?
Per esempio:
<Products> <Offer> ... ... </Products>
- C’è un nodo che apre/chiude ogni singola offerta?
Per esempio:
<Offer> ... </Offer>
Hai risposto NO ad almeno una domanda?HELP – Struttura del catalogo – XML:
ESEMPIO CORRETTO:
<Products>
<Offer>
<Name>DataTraveler G3 16 GB</Name>
<Brand>Kingstone</Brand>
<Description>Pen Drive Professional 16GB USB 2.0</Description>
<OriginalPrice>10,60</OriginalPrice>
<Price>8,60</Price>
<Code>219</Code>
<Link>http:// www. NOMESITO.it/product.asp?Id=219</Link>
<Stock>35</Stock>
<Categories>informatica, chiavette usb/pen drives</Categories>
<Image>http:// www. NOMESITO.it/images/219.jpg</Image>
<ShippingCost>0</ShippingCost>
<PartNumber>TS2GJFV20</PartNumber>
<EanCode>0075678164125</EanCode>
<Weight>0.100</Weight>
<Image2>http:// www. NOMESITO.it/images/219bis.jpg</Image2>
<Image3>http:// www. NOMESITO.it/images/219tris.jpg</Image3>
</Offer>
<Offer>
<Name>Pendrive 4GB Verbatim Store'n'go</Name>
<Brand>Verbatim</Brand>
<Description>Pen Drive Professional 4GB USB 2.0</Description>
<OriginalPrice>6,50</OriginalPrice>
<Price>3,50</Price>
<Code>220</Code>
<Link>http:// www. NOMESITO.it/product.asp?Id=220</Link>
<Stock>5</Stock>
<Categories>informatica, chiavette usb/pen drives</Categories>
<Image>http:// www. NOMESITO.it/images/220.jpg</Image>
<ShippingCost>0</ShippingCost>
<PartNumber>49061</PartNumber>
<EanCode>0075678164134</EanCode>
<Weight>0.100</Weight>
<Image2>http:// www. NOMESITO.it/images/220bis.jpg</Image2>
<Image3>http:// www. NOMESITO.it/images/220tris.jpg</Image3>
</Offer>
</Products>
Altri suggerimenti:
- Verifica che il documento sia valido, ad esempio usando http://validator.w3.org;
- Se riscontri problemi con la codifica dei “caratteri speciali”, puoi codificare con “entità XML” (non HTML); in alternativa, usa CDATA ovunque.