public void setXMLEntity(XMLEntity xml) {
    setDescription(xml.getStringProperty("desc"));
    setIsShapeVisible(xml.getBooleanProperty("isShapeVisible"));

    markerSymbol =
        (AbstractMarkerSymbol) SymbologyFactory.createSymbolFromXML(xml.getChild(0), null);
    markerFillProperties =
        (SimpleMarkerFillPropertiesStyle)
            SymbologyFactory.createStyleFromXML(xml.getChild(1), null);

    if (xml.contains("unit")) { // remove this line when done
      // measure unit (for outline)
      setUnit(xml.getIntProperty("unit"));

      // reference system (for outline)
      setReferenceSystem(xml.getIntProperty("referenceSystem"));
    }

    if (xml.contains("hasOutline")) {
      XMLEntity outlineXML = xml.firstChild("id", "outline symbol");
      if (outlineXML != null) {
        setOutline((ILineSymbol) SymbologyFactory.createSymbolFromXML(outlineXML, "outline"));
      }
    }
  }
  public void setXMLEntity(XMLEntity xml) {
    if (xml.contains("TextField")) {
      setTextField(xml.getStringProperty("TextField"));
    }

    if (xml.contains("HeightField")) {
      setHeightField(xml.getStringProperty("HeightField"));
    }

    if (xml.contains("ColorField")) {
      setColorField(xml.getStringProperty("ColorField"));
    }

    if (xml.contains("RotationField")) {
      setRotationField(xml.getStringProperty("RotationField"));
    }

    if (xml.contains("Unit")) {
      setUnit(xml.getIntProperty("Unit"));
    }

    if (xml.contains("fontName")) {
      Font font =
          new Font(
              xml.getStringProperty("fontName"),
              xml.getIntProperty("fontStyle"),
              xml.getIntProperty("fontSize"));
      setFont(font);
    }
    if (xml.contains("useFixedSize")) {
      useFixedSize = xml.getBooleanProperty("useFixedSize");
      fixedSize = xml.getDoubleProperty("fixedSize");
    }
    if (xml.contains("useFixedColor")) {
      useFixedColor = xml.getBooleanProperty("useFixedColor");
      fixedColor = StringUtilities.string2Color(xml.getStringProperty("fixedColor"));
    }
    if (xml.contains("referenceSystem")) {
      referenceSystem = xml.getIntProperty("referenceSystem");
    }
  }