Skip to content

Commit

Permalink
RM-38406 update libxmljs version
Browse files Browse the repository at this point in the history
  • Loading branch information
kin-lee-ELH committed May 16, 2023
1 parent 8bd5b95 commit 7537861
Show file tree
Hide file tree
Showing 5 changed files with 316 additions and 633 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @elationemr/outside-care
10 changes: 5 additions & 5 deletions browser/lib/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ exports.leafNodeValue = function (node) {
};

exports.xpath = (function () {
var DEFAULT_NS = {
"h": "urn:hl7-org:v3",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"sdtc": "urn:hl7-org:sdtc"
};
var DEFAULT_NS = {
"h": "urn:hl7-org:v3",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"sdtc": "urn:hl7-org:sdtc"
};

return function (doc, p, ns) {
var r = [];
Expand Down
14 changes: 7 additions & 7 deletions lib/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ var libxmljs = require('@manhydra/libxmljs');

exports.parse = function (src) {
var options = {
noblanks: true
preserveWhitespace: false
};

return libxmljs.parseXmlString(src, options);
return libxmljs.parseXml(src, options);
};

exports.leafNodeValue = function (node) {
Expand All @@ -32,11 +32,11 @@ exports.leafNodeValue = function (node) {
};

exports.xpath = (function () {
var DEFAULT_NS = {
"h": "urn:hl7-org:v3",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"sdtc": "urn:hl7-org:sdtc"
};
var DEFAULT_NS = {
"h": "urn:hl7-org:v3",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"sdtc": "urn:hl7-org:sdtc"
};

return function (doc, p, ns) {
return doc.find(p, ns || DEFAULT_NS);
Expand Down
Loading

0 comments on commit 7537861

Please sign in to comment.