Subject:Get Value from non-standard xml Author:michael haskell Date:02 Sep 2008 04:28 AM
Hi All,
I'm working with xml that doesn't follow the standard of enclosing value's within child elements, rather an object is defined, then under it are name and value pairs. Below is an example of what I'm working with:
I have no control over the xml formatting and would like to extract the value of a given tag.
The way I've been approaching it is as follows in pseudo code.
foreach child
if name is "lastupdate"
index = name position
endif
return valueof index+1
I'm learning xsl and haven't had success, coming form a java background, if there is a simpler approach, I've read positions vary greatly depending on the context, and I know the only way to have a variable change is within a foreach loop, let me know.
Subject:Get Value from non-standard xml Author:Elias Huter Date:02 Sep 2008 07:00 AM
Is it always Name/Value/Name/Value/... ? Or is there a chance <dynamic-metadata> has other childs, <Name> or <Value> are there twice or the sequence is somehow else mixed?