Skip to content

System.Xml

reference
1 min readUpdated

Kind: Service

Source: Pams/Core/Pams.Security/Pams.Security.csproj (line 1)

Part of: Pams

NuGet package dependency

System.Xml is a NuGet package dependency declared in Pams.Security.csproj. The Pams.Security project references it for .NET XML types and processing when security-related code reads or writes XML data.

Diagram

mermaid
sequenceDiagram
    participant Client as JavaScript Client
    participant Security as Pams.Security
    participant Xml as System.Xml

    Client->>Security: Send XML payload
    Security->>Xml: Parse or write XML
    Xml-->>Security: XML document or values
    Security-->>Client: Return processed result

Usage

ts
// System.Xml is a .NET dependency and is not imported directly in TypeScript.
// Send XML to an application endpoint handled by Pams.Security.

const xmlPayload = `
<request>
  <user>example-user</user>
</request>
`;

const response = await fetch("/security/xml", {
  method: "POST",
  headers: {
    "Content-Type": "application/xml",
  },
  body: xmlPayload,
});

if (!response.ok) {
  throw new Error(`XML request failed: ${response.status}`);
}

const result = await response.text();
console.log(result);

AI Coding Instructions

  • Keep System.Xml references within the .NET Pams.Security project; TypeScript clients cannot import this NuGet package.
  • Treat XML received from clients as untrusted input and validate expected elements before using their values.
  • Preserve XML content types when sending XML between JavaScript clients and security endpoints.
  • Update the package reference in Pams.Security.csproj rather than adding JavaScript package imports for XML processing.

Was this page helpful?

Download as PDF