115:
116:
117: '; */
118:
119: FUNCTION getProperty(element IN xmldom.DOMElement, key IN VARCHAR2) return VARCHAR2 IS
120: nl xmldom.DOMNodeList;
121: len number;
122: n xmldom.DOMNode;
123: dummyElem xmldom.DOMElement;
116:
117: '; */
118:
119: FUNCTION getProperty(element IN xmldom.DOMElement, key IN VARCHAR2) return VARCHAR2 IS
120: nl xmldom.DOMNodeList;
121: len number;
122: n xmldom.DOMNode;
123: dummyElem xmldom.DOMElement;
124: child xmldom.DOMNode;
118:
119: FUNCTION getProperty(element IN xmldom.DOMElement, key IN VARCHAR2) return VARCHAR2 IS
120: nl xmldom.DOMNodeList;
121: len number;
122: n xmldom.DOMNode;
123: dummyElem xmldom.DOMElement;
124: child xmldom.DOMNode;
125: BEGIN
126: nl := xmldom.getChildNodes(xmldom.makeNode(element)); /* Get all childNodes for the element */
119: FUNCTION getProperty(element IN xmldom.DOMElement, key IN VARCHAR2) return VARCHAR2 IS
120: nl xmldom.DOMNodeList;
121: len number;
122: n xmldom.DOMNode;
123: dummyElem xmldom.DOMElement;
124: child xmldom.DOMNode;
125: BEGIN
126: nl := xmldom.getChildNodes(xmldom.makeNode(element)); /* Get all childNodes for the element */
127: len := xmldom.getLength(nl);
120: nl xmldom.DOMNodeList;
121: len number;
122: n xmldom.DOMNode;
123: dummyElem xmldom.DOMElement;
124: child xmldom.DOMNode;
125: BEGIN
126: nl := xmldom.getChildNodes(xmldom.makeNode(element)); /* Get all childNodes for the element */
127: len := xmldom.getLength(nl);
128:
122: n xmldom.DOMNode;
123: dummyElem xmldom.DOMElement;
124: child xmldom.DOMNode;
125: BEGIN
126: nl := xmldom.getChildNodes(xmldom.makeNode(element)); /* Get all childNodes for the element */
127: len := xmldom.getLength(nl);
128:
129: for i in 0..len-1 loop /* Iterate thru the child nodes */
130: n := xmldom.item(nl, i);
123: dummyElem xmldom.DOMElement;
124: child xmldom.DOMNode;
125: BEGIN
126: nl := xmldom.getChildNodes(xmldom.makeNode(element)); /* Get all childNodes for the element */
127: len := xmldom.getLength(nl);
128:
129: for i in 0..len-1 loop /* Iterate thru the child nodes */
130: n := xmldom.item(nl, i);
131: dummyElem := xmldom.makeElement(n);
126: nl := xmldom.getChildNodes(xmldom.makeNode(element)); /* Get all childNodes for the element */
127: len := xmldom.getLength(nl);
128:
129: for i in 0..len-1 loop /* Iterate thru the child nodes */
130: n := xmldom.item(nl, i);
131: dummyElem := xmldom.makeElement(n);
132:
133: if (xmldom.getTagName(dummyElem) = 'Properties') then /* Still inspect the children of Properties */
134: return getProperty(dummyElem, key);
127: len := xmldom.getLength(nl);
128:
129: for i in 0..len-1 loop /* Iterate thru the child nodes */
130: n := xmldom.item(nl, i);
131: dummyElem := xmldom.makeElement(n);
132:
133: if (xmldom.getTagName(dummyElem) = 'Properties') then /* Still inspect the children of Properties */
134: return getProperty(dummyElem, key);
135: elsif (xmldom.getAttribute(dummyElem,'NAME') = key) then /* if key matches value of NAME attr */
129: for i in 0..len-1 loop /* Iterate thru the child nodes */
130: n := xmldom.item(nl, i);
131: dummyElem := xmldom.makeElement(n);
132:
133: if (xmldom.getTagName(dummyElem) = 'Properties') then /* Still inspect the children of Properties */
134: return getProperty(dummyElem, key);
135: elsif (xmldom.getAttribute(dummyElem,'NAME') = key) then /* if key matches value of NAME attr */
136: child := xmldom.getFirstChild(n); /* this is how the node is retrieved for the NAME key */
137: if NOT (xmldom.isNull(child)) then
131: dummyElem := xmldom.makeElement(n);
132:
133: if (xmldom.getTagName(dummyElem) = 'Properties') then /* Still inspect the children of Properties */
134: return getProperty(dummyElem, key);
135: elsif (xmldom.getAttribute(dummyElem,'NAME') = key) then /* if key matches value of NAME attr */
136: child := xmldom.getFirstChild(n); /* this is how the node is retrieved for the NAME key */
137: if NOT (xmldom.isNull(child)) then
138: return xmldom.getNodeValue(child);
139: else
132:
133: if (xmldom.getTagName(dummyElem) = 'Properties') then /* Still inspect the children of Properties */
134: return getProperty(dummyElem, key);
135: elsif (xmldom.getAttribute(dummyElem,'NAME') = key) then /* if key matches value of NAME attr */
136: child := xmldom.getFirstChild(n); /* this is how the node is retrieved for the NAME key */
137: if NOT (xmldom.isNull(child)) then
138: return xmldom.getNodeValue(child);
139: else
140: return NULL;
133: if (xmldom.getTagName(dummyElem) = 'Properties') then /* Still inspect the children of Properties */
134: return getProperty(dummyElem, key);
135: elsif (xmldom.getAttribute(dummyElem,'NAME') = key) then /* if key matches value of NAME attr */
136: child := xmldom.getFirstChild(n); /* this is how the node is retrieved for the NAME key */
137: if NOT (xmldom.isNull(child)) then
138: return xmldom.getNodeValue(child);
139: else
140: return NULL;
141: end if;
134: return getProperty(dummyElem, key);
135: elsif (xmldom.getAttribute(dummyElem,'NAME') = key) then /* if key matches value of NAME attr */
136: child := xmldom.getFirstChild(n); /* this is how the node is retrieved for the NAME key */
137: if NOT (xmldom.isNull(child)) then
138: return xmldom.getNodeValue(child);
139: else
140: return NULL;
141: end if;
142: end if;