Table of Contents

Function: createXmlFile()

function createXmlFile(root: DocumentInfo): {
  after?: (
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
  })[];
  before?: (
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
  })[];
  kind: "xml";
  root: DocumentInfo;
  schema: "bcf-3.0/documents";
};

Create a bcf-3.0/documents XML document. Save validates it against the official XSD.

Parameters

root

DocumentInfo

Returns

{
  after?: (
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
  })[];
  before?: (
     | {
     kind: "comment";
     value: string;
   }
     | {
     kind: "instruction";
     target: string;
     value: string;
  })[];
  kind: "xml";
  root: DocumentInfo;
  schema: "bcf-3.0/documents";
}

after?

optional after?: (
  | {
  kind: "comment";
  value: string;
}
  | {
  kind: "instruction";
  target: string;
  value: string;
})[];

before?

optional before?: (
  | {
  kind: "comment";
  value: string;
}
  | {
  kind: "instruction";
  target: string;
  value: string;
})[];

kind

kind: "xml";

root

root: DocumentInfo;

schema

schema: "bcf-3.0/documents";

See

https://raw.githubusercontent.com/buildingSMART/BCF-XML/bc48611d0d7a1587f028a2b69677a1aafd5cd0a8/Schemas/documents.xsd