Para ello parto de esto:
Código:
Lo que necesito hacer es agregar la ultima parte (<url>) y repetirla cada ves que cree el post. Eso no es problema.
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>http://subdominio.miweb.com/</loc>
<changefreq>daily</changefreq>
<priority>1.00</priority>
</url>
</urlset>
El problema esta en la ultima linea...
Si actualmente agrego texto al xml se agrega debajo.
¿Como puedo solucionar esa última linea?
Existe alguna forma de borrar la última linea y luego la agrego cuando agregue toda la url + urlset?
Gracias desde ya!



