> For the complete documentation index, see [llms.txt](https://developers.newbluefx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.newbluefx.com/captivate-api/javascript-api-reference/legacy-scheduler-methods/schedulecommandxml-method.md).

# scheduleCommandXML Method

The earliest versions of the API operated by passing XML documents around, and that method is still available through the `scheduleCommandXml` function. For example, this is how to call `readTitle`.

```javascript
let s = ServiceHandler.scheduler;
s.scheduleCommandXml(
  '<newblue_ext command="readTitle" channel="-1" input="API Tour: JSON Command Tester" />',
  callback
);

// or when using promises ...
await s.scheduleCommandXml('<newblue_ext command="readTitle" channel="-1" input="API Tour: JSON Command Tester" />');

// is essentially equivalent to this:
await s.scheduleCommand('readTitle', { channel: -1, input: 'API Tour: JSON Command Tester' }, {});
```

The xml document should be constructed with a root node named `newblue_ext` with parameters specified as attributes on the node, and variables specified as child nodes if relevant to the command.

Captivate will respond by passing the following XML to the callback function:

```xml
<newblue_ext command="readTitle" reply="readTitle" success="1">
    <title position="4" ready="1" name="Carbon Basketball Scoreboard" input="Shared: Objects,API Tour: JSON Command Tester" id="{05930c36-bd6d-4350-80cd-f58b476fbde9}" function="" inputActive="1" selected="0">
        <running time="111.6" playInStart="0" playInEnd="0" playOutStart="0" playOutEnd="0" playHead="0" playState="Off" />
        <variables>
            <variable name="Clock 1" value="00:00" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Clock 2" value="0" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Home Score" value="0" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Home Short Name" value="HOME" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Home Timeouts" value="" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Period" value="1" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Visitor Score" value="0" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Visitor Short Name" value="VSTR" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Visitor Timeouts" value="" varType="128" dataType="text" dynamic="1" input="" show="1" />
            <variable name="Home Poss." value="1" varType="128" dataType="visible" dynamic="1" input="" show="1" />
            <variable name="Message" value="1" varType="128" dataType="visible" dynamic="1" input="" show="1" />
            <variable name="Visitor Poss." value="1" varType="128" dataType="visible" dynamic="1" input="" show="1" />
            <variable name="Home Logo" value="/Library/Application Support/NewBlue/Titler Content/Resources/Library/Project Templates/Sports/Carbon/textures/Placeholder-A.png\\\0" varType="128" dataType="style-texture.texture" dynamic="1" input="" show="1" />
            <variable name="Visitor Logo" value="/Library/Application Support/NewBlue/Titler Content/Resources/Library/Project Templates/Sports/Carbon/textures/Placeholder-B.png\\\0" varType="128" dataType="style-texture.texture" dynamic="1" input="" show="1" />
            <variable name="Duration" value="1.502" varType="128" dataType="duration" dynamic="1" input="" show="0" />
            <variable name="Home Color" value="#ff1e1e1e" varType="0" dataType="style-texture.color" dynamic="0" input="" />
            <variable name="Visitor Color" value="#ff2065ab" varType="0" dataType="style-texture.color" dynamic="0" input="" />
            <variable name="Position" value="0,0" varType="0" dataType="position" dynamic="0" input="" />
            <variable name="Scale" value="1,1" varType="0" dataType="scale" dynamic="0" input="" />
        </variables>
    </title>
</newblue_ext>
```

Notice that the reported `inputName` has all connected inputs separated by a comma.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.newbluefx.com/captivate-api/javascript-api-reference/legacy-scheduler-methods/schedulecommandxml-method.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
