Cycles standalone Render Layers and Composite nodes
Cycles is a renderer. It provides the data that a compositor can use to combine the data to a final image. Blender's compositor is written inside blender and cannot be run outside Blender as it is tight related to other parts of Blender's pipeline.

So basically the answer to your question is no, you cannot do it via the XML API of Cycles as it does not know anything about compositing; except producing the combined pass, which cannot be influenced.

You can always modify Blender as it is open source, but there are other channels that are better to ask these development questions, like IRC or https://devtalk.blender.org/