Skip to content

XML formatter is broken #1678

Description

@andrewvaca

Current behavior

I've just downloaded v2.0-preview.9 and the XML formatter is broken on 2 levels.

  1. the textarea for source is behaving strangely, when you paste some text, you can only click below the text to edit, clicking directly to the text unselects the textarea completely, so editing the source is almost impossible
  2. The formatter is validating the the source, but it should only format it, older versions does it correctly, there is function "XML tester" for validation, I'm using parts of XML to format so I can read it easily, but now it tries to validate it and fails for example for missing namespace, but it is irrelevant for formatting.

This is my example for easy-to-format XML, but it fails:
<act:accountingItem><act:id>158743</act:id><act:source>test</act:source></act:accountingItem>

Using macOS 15.7.4

How to reproduce it (as minimally and precisely as possible)

  1. open XML formatter
  2. paste in "Input" textarea string <act:accountingItem><act:id>158743</act:id><act:source>test</act:source></act:accountingItem>
  3. click anywhere on the pasted string

Result:

  1. the textarea "Input" is not focused
  2. in "Output" textarea contains "Xml_MessageWithErrorPosition, Xml_UnknownNs, 1, 2"

Expected behavior

  1. the cursor should be blinking in the clicked part of the string
  2. "Output" textarea should be displaying:
    <act:accountingItem>
    <act:id>158743</act:id>
    <act:source>test</act:source>
    </act:accountingItem>

Screenshots

No response

Workaround

You can click below pasted text to start the textarea working properly.

Affected platforms

macOS

Affected DevToys kind

DevToys (app with GUI)

DevToys Version

v2.0-preview.9

Relevant Assets/Logs

log-20260504T225634.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions