The answer to that question would be yes, no, sort of and it depends...
A dedicated DI box converts an instrument level signal (and also the impedance) into a mic level signal which means you will need to feed it into a mic preamp to bring the level up to a line level signal. A dedicated DI box will usually provide a very clean signal (unless it's a DI box that intentionally colors the signal with tubes&transformers) and will usually not have any tone controls/eq. A dedicated DI box will often have a switch for polarity reverse and a pad.
The balanced out on an amp will sometimes provide a mic level signal but often it's a line level signal. The sound of the balanced out XLR on an amp will usually be colored by the preamp section of the amp, in some rare cases also by the output section of the amp and depending on the design possibly also be affected by the tone control/eq settings of the amp. The output volume on the XLR may be even be affected by the amp settings but every amp is different. There is no standard for balanced outputs on amps. How they work and what kind of signal they provide will depend on the amp. In my experience XLR outputs on amps are usually more noisy than a dedicated DI box but I'm sure there are amps with high quality, low noise XLR outputs too.
The balanced out XLR of an amp can obviously not be used without having the amp connected to a load, which usually means a cab and that means LOUD. A dedicated DI box can be used for SILENT direct recording. You can of course use a load box with an amp for silent recording but load boxes are usually more expensive than a DI box so it really depends what kind of setup you want/need.
So yeah, it's kinda the same but not really...
You can certainly connect the XLR output of your amp directly to your interface. You just need to know whether the XLR output is mic level or line level. If you get decent levels without excessive noise or clipping the inputs on your interface it sounds like you're doing it right.