<listitems xmlns="http://schemas.microsoft.com/sharepoint/soap/"
xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
<rs:data ItemCount="1">
<z:row ows_BL_x0020_AWB_x0020_Number="7342128"
ows_DocLink="http://iserver/subsite/Documents%20for%20Review%2FTSCW%2DCL0214/7342128_BillofLading_6212457_2008102193356.pdf,
http://iserver/subsite/Documents%20for%20Review%2FTSCW%2DCL0214/7342128_BillofLading_6212457_2008102193356.pdf"
ows_MetaInfo="794;#"
ows__ModerationStatus="0"
ows__Level="1"
ows_ID="794"
ows_owshiddenversion="3"
ows_UniqueId="794;#{2FC479E5-9DA0-4ED5-A29F-27B826AAE6F9}"
ows_FSObjType="794;#0"
ows_Created="2008-04-12T00:33:55Z"
ows_FileRef="794;#docportal/Lists/Documentation Repository/794_.000"/>
</rs:data>
</listitems>
You will notice that the data node is in the rs namespace and the row node is in the z
namespace. When I try to get a node as such:
XMLDoc.XML.Text := XML;
XMLDoc.Active := True;
Node := XMLDoc.DocumentElement.ChildNodes['data'];
ItemCount := RootNode.attributes['ItemCount'].nodeValue;
It fails with an error saying that node 'data' not found. I have also tried using
ChildNodes['rs:data'] with the same result.
I assume that there must be some way to set which namespace you want to use prior to
accessing the attributes but I am unsure as to how to do this. Does anyone have any
ideas?
Thanks
Chris
---
Chris Krohn
IT Manager
Cayman Islands Port Authority
ckrohn at caymanport dot com
Try GetAttributeNS:
ItemCount := StrToInt(RootNode.GetAttributNS('ItemCount',
'urn:schemas-microsoft-com:rowset'));
Hope this helps(tm)
--
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de
RootNode.ChildNodes[0].AttributeNodes[0].NodeValue
it works. But I can't figure any way to access it other than by index postion.
Chris
On Tue, 22 Apr 2008 07:40:49 +0200, Michael Justin <michael...@nospam.gmx.net> wrote:
>> You will notice that the data node is in the rs namespace and the row node is in the z
>> namespace.
>
>Try GetAttributeNS:
>
>ItemCount := StrToInt(RootNode.GetAttributNS('ItemCount',
>'urn:schemas-microsoft-com:rowset'));
>
>Hope this helps(tm)
---