Log in
Model

Element

Magento\Shipping\Model\Simplexml\Element

What it does

This class extends Magento's base SimpleXML Element to provide enhanced XML handling specifically for shipping data.

It automatically escapes special XML characters (like ampersands) when adding attributes or child elements, preventing XML parsing errors.

Developers use this when building XML requests for shipping carrier APIs to ensure data is properly encoded.

Public Methods

  • addAttribute()
  • addChild()
  • xmlentities()