<memberlist>
    <totalpublic>{{ public_membership_count }}</totalpublic>
    <total>{{ membership_count }}</total>
    <public_members>{% for member in public_members %}
        <person>
            <name>{{ member.name }}</name>
            <url>{{ member.primary_contact.homepage }}</url>
        </person>{% endfor %}
    </public_members>
</memberlist>

<?xml version="1.0" encoding="UTF-8"?>
<memberlist>
    <totalpublic>{{ public_membership_count }}</totalpublic>
    <total>{{ membership_count }}</total>
    <public_members>{% for member in public_members %}
        <person>
            <name>{{ member.name }}</name>
            <url>{{ member.primary_contact.homepage }}</url>
        </person>{% endfor %}
    </public_members>
</memberlist>

Add XML header to public member list XML
Add XML header to public member list XML
