• Parses the text content of the current element via the given parse and stringify functions.

    Does not currently support mixing text and element nodes. E.g. the XML <note>Dear <name>John</name>, I regret to inform you...</note> could not be serialized or deserialized using xml rule mappings.

    Type Parameters

    • T

    Parameters

    • parse: ((str: string) => T)

      The string passed to this parser is the processed text content of the current element.

        • (str): T
        • Parameters

          • str: string

          Returns T

    • stringify: ((value: T) => string)

      Serializes the value.

        • (value): string
        • Parameters

          • value: T

          Returns string

    Returns CharactersRule<T>

    processCharacters