Skip to content

Main content

XML Processing Instruction Target Token Tool

Parse a processing instruction with an ASCII XML name subset and reject the reserved XML target.

Loading tool…

Description

Parse a processing instruction with an ASCII XML name subset and reject the reserved XML target.

XML distinguishes element and attribute names, entity references, processing instructions, and document-level rules. Quoting, entity expansion, namespaces, and Unicode name characters are separate concerns. A restricted token recognizer does not automatically provide a complete or validating XML parser.

Parse a processing instruction with an ASCII XML name subset and reject the reserved XML target.

When to use this tool

Use XML Processing Instruction Target Token when you need the stated restricted XML token decomposition without parsing or expanding a document.

How to use the tool and how it works

  1. Enter text. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read target, content. Use the output convention below.

Match one complete processing-instruction wrapper with an ASCII target name and optional whitespace-separated content. Reject a target equal to xml in any case and content containing an embedded closing delimiter; return target and content or an empty string.1

Input fieldMeaning and unitsAccepted input
textSupplied text under the stated token or offset convention.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
targetTargetRequired. Text; maximum UTF-16 length 8192.
contentContentRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "text": "<?style sheet?>"
  },
  "output": {
    "target": "style",
    "content": "sheet"
  }
}

Limitations and assumptions

  • Only the stated ASCII name grammar is supported. No document is parsed, external resource loaded, instruction executed, encoding declared, or XML-level content validity established.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use an XML parser with appropriate document, namespace, character, and entity policies for complete validation. A local name or wrapper match does not replace those checks.

References

  1. Calculation and input contract: parse/xml-processing-instruction-target-token — tool.io

Similar or alternative tools