FinalDraft.h header

#include <ew/app/FinalDraft.h>

Namespace ew::app

Functions

std::vector< ScreenplayElement > ew::app::parseFinalDraftXml(const QString &xml)

Parses Final Draft (.fdx) xml into screenplay elements: each <Paragraph> becomes an element whose kind comes from its Type attribute (falling back to Action for unknown types) and whose text is the concatenation of its <Text> runs. Malformed XML yields whatever was parsed before the error.

QString ew::app::toFinalDraftXml(const std::vector< ScreenplayElement > &elements)

Serializes elements to Final Draft (.fdx) XML: a <FinalDraft> document whose <Content> holds one <Paragraph Type="…"><Text>…</Text></Paragraph> per element. The paragraph Type uses the element's Final-Draft label, so the printed element kinds map to the exact names Final Draft expects (Scene Heading, Action, Character, Dialogue, Parenthetical, Transition).