-
XML Data Islands
I have a XML Data Island on my page. How can I extract the record I need
from the data island. For instance, if I have a data island populated with
order records and I need to retrieve only the record for a certain order
id (ex:OrderId = 214).
I'm sure this is probably basic, but I am pretty new to this.
Thanks
-
Re: XML Data Islands
Create a DOMDocument object and use the selectSingleNode method with an XSLT
query. I haven't tested this exact code, but it should be very close.
For example, assuming your document looks like this:
<xml id="MyDataIsland">
<someelement>
<someotherelement>
<targetelement OrderID="214">
.....
You could use this code:
dim xmlDoc
Set xmlDoc = document.all("MyDataIsland")
dim aNode
set aNode = xmlDoc.selectSingleNode("someelement/someotherelement[@OrderID =
'214']")
if aNode is Nothing then
' error handler here
end if
' do something with aNode.
"Byron" <byronyoh@aol.com> wrote in message news:3a9552cd$1@news.devx.com...
>
> I have a XML Data Island on my page. How can I extract the record I need
> from the data island. For instance, if I have a data island populated
with
> order records and I need to retrieve only the record for a certain order
> id (ex:OrderId = 214).
>
> I'm sure this is probably basic, but I am pretty new to this.
>
> Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks