extractArchiModelXml
Esta página aún no está disponible en tu idioma.
cda-developer-portal / extractArchiModelXml
Function: extractArchiModelXml()
Section titled “Function: extractArchiModelXml()”extractArchiModelXml(
bytes):string
Defined in: parser/zip-utils.d.ts:24
Reads a .archimate file’s raw bytes and returns the model XML text,
whether the file is plain XML or the zip-archive variant Archi’s own
ArchiveManager writes when a model has embedded images (model.xml +
an images/ entry per custom icon, zipped together under the same
.archimate extension — see Archi’s own source, not just observed
samples: useArchiveFormat()/saveModelToArchiveFile() in
com.archimatetool.editor.model.impl.ArchiveManager).
Pass the result to parseArchiModel. Kept as a separate step
(rather than folded into parseArchiModel itself) so that function’s
(xml: string) => ArchiModel contract never changes: callers who know
their input is always plain XML text can keep calling it directly.
Only the model.xml entry is decoded; embedded images are not
extracted (see ArchiProfile.imagePath for how to locate them by
name if needed — this function does not resolve image bytes).
Throws if the input looks like a zip but has no model.xml entry, uses
a compression method other than Stored/Deflate (Archi never writes
anything else), fails its CRC-32 integrity check, or is a
truncated/corrupt zip.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”string