@azure/core-xml
Advanced tools
Comparing version 1.3.1-alpha.20221107.4 to 1.3.1-alpha.20221121.1
@@ -85,2 +85,3 @@ // Copyright (c) Microsoft Corporation. | ||
function domToObject(node, options) { | ||
var _a; | ||
let result = {}; | ||
@@ -114,4 +115,13 @@ const childNodeCount = node.childNodes.length; | ||
const child = node.childNodes[i]; | ||
// Ignore leading/trailing whitespace nodes | ||
if (child.nodeType !== Node.TEXT_NODE) { | ||
// Check if CData | ||
if ((child === null || child === void 0 ? void 0 : child.nodeType) === Node.CDATA_SECTION_NODE) { | ||
// Already in the CDATA | ||
result = child.textContent; | ||
} | ||
else if (((_a = child === null || child === void 0 ? void 0 : child.firstChild) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.CDATA_SECTION_NODE) { | ||
// Look if child is CDATA | ||
result[child.nodeName] = child.textContent; | ||
} | ||
else if (child.nodeType !== Node.TEXT_NODE) { | ||
// Ignore leading/trailing whitespace nodes | ||
const childObject = domToObject(child, options); | ||
@@ -118,0 +128,0 @@ if (!result[child.nodeName]) { |
{ | ||
"name": "@azure/core-xml", | ||
"version": "1.3.1-alpha.20221107.4", | ||
"version": "1.3.1-alpha.20221121.1", | ||
"description": "Core library for interacting with XML payloads", | ||
@@ -31,3 +31,3 @@ "sdk-type": "client", | ||
"clean": "rimraf dist dist-* temp types *.tgz *.log", | ||
"execute:samples": "echo skipped", | ||
"execute:samples": "dev-tool samples run samples-dev", | ||
"extract-api": "tsc -p . && api-extractor run --local", | ||
@@ -106,2 +106,3 @@ "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", | ||
"sinon": "^9.0.2", | ||
"ts-node": "^10.9.1", | ||
"typescript": "~4.8.0", | ||
@@ -108,0 +109,0 @@ "util": "^0.12.1" |
@@ -26,3 +26,3 @@ # Azure Core XML client library for JavaScript | ||
Examples can be found in the `samples` folder. | ||
Examples can be found in the `samples-dev` folder and can be ran using `rushx execute:samples`. | ||
@@ -29,0 +29,0 @@ ## Next steps |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54943
473
32