|
@@ -24,7 +24,7 @@ export class UANodeSet implements IToXML{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- resolveChildren(nm: Map<string, UABaseNode>) {
|
|
|
+ resolveReferences(nm: Map<string, UABaseNode>) {
|
|
|
for(const node of this.nodes) {
|
|
|
node.resolveReferences(nm);
|
|
|
}
|
|
@@ -50,11 +50,8 @@ export class UANodeSet implements IToXML{
|
|
|
static async parse(xml: string, fileName: string): Promise<UANodeSet> {
|
|
|
const parseOptions:Partial<X2jOptions>={
|
|
|
ignoreAttributes: false,
|
|
|
- numberParseOptions: {
|
|
|
- hex: false,
|
|
|
- leadingZeros: false,
|
|
|
- skipLike: /./ //disable number detection. Otherwise string values might end up as numbers.
|
|
|
- },
|
|
|
+ alwaysCreateTextNode: true, //force consistent result
|
|
|
+ parseTagValue:false, //disable number detection. Otherwise string values might end up as numbers.
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
isArray: (name, jpath, isLeafNode, isAttribute):boolean => {
|
|
|
switch(jpath) {
|
|
@@ -90,7 +87,7 @@ export class UANodeSet implements IToXML{
|
|
|
const nst=new NamespaceTable();
|
|
|
if(uaNamespaceUris) {
|
|
|
for(const nsUri of uaNamespaceUris['Uri']) {
|
|
|
- nst.addUri(nsUri)
|
|
|
+ nst.addUri(nsUri['#text'])
|
|
|
}
|
|
|
}
|
|
|
return new UANodeSet(fileName, models, nodes, nst);
|