render_markdown / render_xml

View as MarkdownOpen in Claude

render_markdown

Render the entire POM as a Markdown string. Sections become ## headings, subsections become ### headings, and bullets render as Markdown lists.

Parameters

None.

Returns

str — The rendered Markdown text.


render_xml

Render the entire POM as an XML string. Useful when the AI benefits from XML-structured prompts.

Parameters

None.

Returns

str — The rendered XML text.

Example

1from signalwire.core.pom_builder import PomBuilder
2
3pom = PomBuilder()
4pom.add_section("Role", body="You are a helpful assistant.")
5pom.add_section("Rules", bullets=["Be concise", "Be accurate"])
6
7# Render as Markdown
8md = pom.render_markdown()
9print(md)
10# ## Role
11# You are a helpful assistant.
12#
13# ## Rules
14# - Be concise
15# - Be accurate
16
17# Render as XML
18xml = pom.render_xml()
19print(xml)