Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

InvoiceSourceDocument

OfficeIMO.Invoicing

Namespace
OfficeIMO.Invoicing
Assembly
OfficeIMO.Invoicing
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

Immutable CII/UBL source XML for bounded edits that retain unmapped extensions. Loading does not establish standards or business-rule compliance.

Inheritance

  • object
  • InvoiceSourceDocument

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 1

Methods

Load 3 overloads
public static InvoiceSourceDocument Load(byte[] xml) #

Captures a defensive copy of supported source XML with DTDs/external entities disabled and size, depth, node and attribute limits.

Parameters

xml byte[] required
public static InvoiceSourceDocument Load(Stream stream) #

Reads from the current stream position, leaves the stream open, and consumes at most the byte limit plus one byte.

Parameters

stream System.IO.Stream required
public static InvoiceSourceDocument Load(string path) #

Loads a file under the same source limits.

Parameters

path string required
public byte[] ToBytes() #

Returns a defensive copy. Unedited documents are byte-identical; edited documents retain XML content using UTF-8, without preserving original lexical formatting.

Returns

byte[]

Properties

public InvoiceSyntax Syntax { get; } #

Source syntax. UBL includes Invoice and CreditNote roots.

public bool IsUblCreditNote { get; } #

Whether the source root is a UBL credit note.

public bool HasXmlSignature { get; } #

Whether XML Signature content is present. Signatures are not verified.

public string? Number { get; } #

Existing invoice number, or null when missing. Ambiguous or nested fields are rejected.

public string? TypeCode { get; } #

Declared document type, without establishing compliance.

public string? GuidelineId { get; } #

Declared profile guideline/customization identifier.

public string? Currency { get; } #

Declared invoice currency, without validating its monetary amounts.

public DateTime? IssueDate { get; } #

Issue date for a format-102 CII date or plain ISO UBL date; null for other representations.

public DateTime? DueDate { get; } #

Existing payment due date in the supported date representation. UBL credit notes have no supported due-date edit contract.

public string? BuyerReference { get; } #

Existing buyer reference.

public string? PaymentReference { get; } #

Existing remittance reference. Multiple UBL payment-means occurrences are ambiguous and rejected.

Fields

public const int MaximumXmlBytes #

Maximum accepted and edited XML bytes, including a byte order mark.

Value: 16777216
public const int MaximumXmlNodes #

Maximum XML nodes accepted before tree materialization.

Value: 100000
public const int MaximumXmlAttributes #

Maximum XML attributes accepted before tree materialization.

Value: 200000