It depends on how often you wish to generate the XML file. If you are
content to generate once per archive record, then use the WeeWX templating
system. This is super easy. Create a file current.xml.tmpl that looks
something like this:

<current>
 <lastupdate>
$current.dateTime
</lastupdate>
 <temperature>
$current.outTemp,formatted
</temperature>
 <pressure>
$current.barometer.formatted
</pressure>
 <humidity>
$current.humidity.formatted
</humidity>
 <dewpoint>
$current.dewpoint.formatted
</dewpoint>
  ... (etc)

</current>

See the Customizing Guide for details on the "tags
<http://weewx.com/docs/customizing.htm#customizing_templates>."

Then in the file skin.conf, add it to the list of files to be processed:

[CheetahGenerator]
    ...

    [[ToDate]]

        ...
        [[[my_xml]]]
            template = current.xml.tmpl


When WeeWX process the archive record and does report generation, it will
produce a file with the name current.xml.

However, if you wish to generate this file once per LOOP packet, then it
gets more difficult. You would need to write something like the csv
extension, except that it generates XML.

-tk


On Sun, Aug 12, 2018 at 8:14 AM jahfly1000 <jah...@msn.com> wrote:

> Hello,
> No, I'm sorry, I'm not waiting for me to do everything.
> I did some research and I found this discussion:
> https://groups.google.com/forum/#!topic/weewx-user/wWO4wmrD-yE
> So I concluded that with svc I could do xml. but I am open to any other
> trick to get there. just explain me how to generate a new weewx report in
> xml.
> And if i use StdPrint, is that i can generate a xml report?
> thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to