I generated my sitemap xml files using wicket, the xml is something like:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9";>
   <url wicket:id="urlList">
      <loc wicket:id="locNode">http://www.example.com/</loc>
      <lastmod wicket:id="lastmodNode">2005-01-01</lastmod>
      <changefreq wicket:id="changefreqNode">monthly</changefreq>
      <priority wicket:id="priorityNode">0.8</priority>
   </url>
</urlset> 

be sure to name the markup file .xml and to override 

        @Override
        public String getMarkupType() {
                return "xml";
        }

in your page ... that should work

Milan Křápek wrote:
> 
> Hi, 
>  I want to generate XML document using wicket but I have this problem.
> 
> I want to generate something like
> 
> <root>
>   <var name="a1"/>
>   <var name="a2"/>
>   <var name="a3"/>
>  
>   <otherStructure/>
> </root>
> 
> I decided to generate the <var> elements by ListView. This has some
> problem, because after rendering I have in my XML document 
> some   elements that I cannot have there.
> 
> After some investigation and removing wicket dependent markups by 
>   getMarkupSettings().setStripWicketTags(true); and
> setRenderBodyOnly(true);
> 
>  I get this XML code:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
>   <wicket:container wicket:id="vars">
>     
>   </wicket:container>
> </root>
> 
> where vars is my ListView that add Label var that contains string s =
> "<var name=\"" + String varName + "\" />".
> I thought this should work, but wicket encode '<' and '>' as &lt; &gt;
> that is not valid XML.
> 
> All I need is to say wicket to do not encode this characters. Any Idea??
> 
> The second idea I have was to do something like :
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
>   <wicket:container wicket:id="vars">
>     <var wicket:message="name:myLabel"/>
>   </wicket:container>
> </root>
> 
> But it has some problem too. I know how to give to wicket:message
> attribute some value from my properties file, but is there any way to add
> there a Label??
> 
> Thanks for any halp. I did not say that there cannot be any other way how
> to do it, but I have not found it.
> 
> Please help. This is very urgent and blokable for me. If I did not find
> the way how to do it I will have to look up for some another presentation
> layer. That will be very bad, because except this I found Wicket great.
> 
> Sorry for my English.
> 
> Milan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/wicket-xml---add-label-as-xml-element-atribute-tp17253179p17253615.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to