08-27-05 10:49 PM
Hi,
If I have the following message (listed at the end of this mesage), how can
I get the count of the <WORK_BUNDLE_QUAL:Record> element? and how can I get
to extract the node <WORK_BUNDLE_QUAL:Record> and assign to a message (whic
h
I defined it as an xml document)? Any help is much appreciated.
I tried to count with the following statement but it's always zero.
recordCount = System.Convert.ToInt32(xpath(FileMessage,
"count(/*[local- name()='WORK_BUNDLE_QUAL:TableChangeEven
t' and
namespace-uri()='http://iwaysoftware.com/exposed/gracew/TXI/Tables/WORK_BUND
LE_QUALITY_CODES']/*[local-name()='WORK_BUNDLE_QUAL:UpdatedRows'
and
namespace-uri()='http://iwaysoftware.com/exposed/gracew/TXI/Tables/WORK_BUND
LE_QUALITY_CODES']/*[local-name()='WORK_BUNDLE_QUAL:Record'
and
namespace-uri()='http://iwaysoftware.com/exposed/gracew/TXI/Tables/WORK_BUND
LE_QUALITY_CODES'])"));
Message is as follows:
----------------
<?xml version="1.0" encoding="utf-8"?>
<WORK_BUNDLE_QUAL:TableChangeEvent
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:exposed="http://iwaysoftware.com/exposed"
xmlns:WORK_BUNDLE_QUAL="http://iwaysoftware.com/exposed/gracew/TXI/Tables/WO
RK_BUNDLE_QUALITY_CODES">
<WORK_BUNDLE_QUAL:UpdatedRows>
<WORK_BUNDLE_QUAL:Record>
<WORK_BUNDLE_QUAL:QUALITY_CODE>02</WORK_BUNDLE_QUAL:QUALITY_CODE>
<WORK_BUNDLE_QUAL:DESCRIPTION>grace 2 test table
change</WORK_BUNDLE_QUAL:DESCRIPTION>
<WORK_BUNDLE_QUAL:ACTION>U</WORK_BUNDLE_QUAL:ACTION>
WORK_BUNDLE_QUAL:ROWID>AAAHZ2AALAAAAAmAAA</WORK_BUNDLE_QUAL:ROWID>
</WORK_BUNDLE_QUAL:Record>
</WORK_BUNDLE_QUAL:UpdatedRows>
</WORK_BUNDLE_QUAL:TableChangeEvent>
[ Post a follow-up to this message ]
|