|
Home > Archive > BizTalk Server Orchestration > November 2005 > help please...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| MapleLeaf 2005-08-27, 5: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 (which
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_BUNDLE_QUALITY_CODES']/*[local-name()='WORK_BUNDLE_QUAL:UpdatedRows'
and
namespace-uri()='http://iwaysoftware.com/exposed/gracew/TXI/Tables/WORK_BUNDLE_QUALITY_CODES']/*[local-name()='WORK_BUNDLE_QUAL:Record'
and
namespace-uri()='http://iwaysoftware.com/exposed/gracew/TXI/Tables/WORK_BUNDLE_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/WORK_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>
| |
|
| Hi,
Used this expression for xpath.
count(/WORK_BUNDLE_QUAL:TableChangeEvent/WORK_BUNDLE_QUAL:UpdatedRows/WORK_BUNDLE_QUAL:Record)
Regards and Thanks,
Abby
"MapleLeaf" wrote:
> 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 (which
> 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_BUNDLE_QUALITY_CODES']/*[local-name()='WORK_BUNDLE_QUAL:UpdatedRows'
> and
> namespace-uri()='http://iwaysoftware.com/exposed/gracew/TXI/Tables/WORK_BUNDLE_QUALITY_CODES']/*[local-name()='WORK_BUNDLE_QUAL:Record'
> and
> namespace-uri()='http://iwaysoftware.com/exposed/gracew/TXI/Tables/WORK_BUNDLE_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/WORK_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>
|
|
|
|
|