creating a XML to read in a Java XStream

I am creating XML to be read in a Java program using the XStream library through the serial port. I’m doing like the code below, but would there be any simpler way to send this XML?

#ifndef __GRAVITY_CAR_H__
#define __GRAVITY_CAR_H__

#include <SoftwareSerial.h>
#include "Arduino.h"

#define XML_BUFFER_SIZE          64
#define XML_HEADER                   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
#define XML_LEFT_BRAKE_TAG           "<leftBrake> "
#define XML_RIGHT_BRAKE_TAG          "<rightBrake> "
#define XML_STEERING_ANGLE_TAG       "<steerAngle> "
#define XML_LEFT_BRAKE_END_TAG       " </leftBrake>"
#define XML_RIGHT_BRAKE_END_TAG      " </rightBrake>"
#define XML_STEERING_ANGLE_END_TAG   " </steerAngle>"


class GravityCar {
  public:
    GravityCar(int leftBrakePin, int rightBrakePin, int steeringAnglePin);

    void writeSerialXml(SoftwareSerial bluetooth);

    int getLeftBrake() const { return analogRead(mLeftBrakePin); }
    int getRightBrake() const { return analogRead(mRightBrakePin); }
    int getSteeringAngle() const { return analogRead(mSteeringAnglePin); }

  private:
    int mLeftBrakePin;
    int mRightBrakePin;
    int mSteeringAnglePin;

    //StaticJsonDocument<JSON_BUFFER_SIZE> document;
};

#endif  /* __GRAVITY_CAR_H__ */
#include "GravityCar.h"



GravityCar::GravityCar(int leftBrakePin, int rightBrakePin, int steeringAnglePin) {
  pinMode(leftBrakePin, INPUT);
  pinMode(rightBrakePin, INPUT);
  pinMode(steeringAnglePin, INPUT);

  mLeftBrakePin = leftBrakePin;
  mRightBrakePin = rightBrakePin;
  mSteeringAnglePin = steeringAnglePin;
}

void GravityCar::writeSerialXml(SoftwareSerial bluetooth) {
  bluetooth.print("\n");
  bluetooth.flush();
  
  bluetooth.print("\n");
  bluetooth.print(XML_HEADER);
  bluetooth.print("\n");
  bluetooth.print(XML_LEFT_BRAKE_TAG);
  bluetooth.print(getLeftBrake());
  bluetooth.print(XML_LEFT_BRAKE_END_TAG);
  bluetooth.print("\n");
  bluetooth.print(XML_RIGHT_BRAKE_TAG);
  bluetooth.print(getRightBrake());
  bluetooth.print(XML_RIGHT_BRAKE_END_TAG);
  bluetooth.print("\n");
  bluetooth.print(XML_STEERING_ANGLE_TAG);
  bluetooth.print(getSteeringAngle());
  bluetooth.print(XML_STEERING_ANGLE_END_TAG);
  
  bluetooth.flush();
}
#include "GravityCar.h"

#define PIN_LEFT_BRAKE      A1
#define PIN_RIGHT_BRAKE     A3
#define PIN_STEERING_ANGLE  A2

#define PIN_BLUETOOTH_RX  2
#define PIN_BLUETOOTH_TX  3

#define SERIAL_BAUD_RATE    9600
#define INTERVAL            10

SoftwareSerial BTSerial(PIN_BLUETOOTH_RX, PIN_BLUETOOTH_TX);
GravityCar car(PIN_LEFT_BRAKE, PIN_RIGHT_BRAKE, PIN_STEERING_ANGLE);

long previousMillis = 0;

void setup() {
  Serial.begin(SERIAL_BAUD_RATE);
  BTSerial.begin(SERIAL_BAUD_RATE);
}

void loop() {
  car.writeSerialXml(BTSerial);
  delayMicroseconds(INTERVAL);
}