<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/XMLParser/shouldReportNamespacePrefixes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSXMLParser(py)shouldReportNamespacePrefixes"
  },
  "title" : "shouldReportNamespacePrefixes"
}
-->

# shouldReportNamespacePrefixes

A Boolean value that determines whether the parser reports the prefixes indicating the scope of namespace declarations.

```
var shouldReportNamespacePrefixes: Bool { get set }
```

## Discussion

<doc://com.apple.documentation/documentation/Swift/true> if the parser reports the scope of namespace declarations, <doc://com.apple.documentation/documentation/Swift/false> otherwise. The default value is <doc://com.apple.documentation/documentation/Swift/false>.

The parser reports prefixes with the delegate methods [`parser(_:didStartMappingPrefix:toURI:)`](/documentation/Foundation/XMLParserDelegate/parser(_:didStartMappingPrefix:toURI:)) and [`parser(_:didEndMappingPrefix:)`](/documentation/Foundation/XMLParserDelegate/parser(_:didEndMappingPrefix:)).

---

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)