<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/XMLNode/objectValue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSXMLNode(py)objectValue"
  },
  "title" : "objectValue"
}
-->

# objectValue

Returns the object value of the receiver.

```
var objectValue: Any? { get set }
```

## Return Value

The object value of the receiver, which may be the same as the value returned by [`stringValue`](/documentation/Foundation/XMLNode/stringValue). For nodes without content (for example, document nodes), this method returns the string value, or an empty string if there is no string value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)