Subject:Howto search multiple XML files (>100) Author:Achim S. Date:14 Sep 2007 09:49 AM Originally Posted: 14 Sep 2007 09:46 AM
Hi,
today I tried several things with SSDN to solve my problem. I'm not very skilled in XML. I reached several goals, but I can't get it alltogether.
This is my Problem:
I have a bunch of xml-files, see a sample attached. These xml-Files discribe an implementation of an embedded system. There is a bug in that system, and I have to find all the elements, which look the same.
My Query is:
Show me all <OneDImplementation> which have (@implType="int8" or "int16" or "int32") and @ImplementationInterval min >= 0.
Subject:Howto search multiple XML files (>100) Author:Minollo I. Date:14 Sep 2007 10:36 AM
Using DataDirect XQuery in the XQuery editor (our default XQuery processor), you can do something like:
<myImplementations> {
for $implementation in collection("file:///c:/?select=Class_ESDL.implementation*")//OneDImplementation
where ($implementation/XAxis/NumericImplementation/@implType eq "int8"
or $implementation/XAxis/NumericImplementation/@implType eq "int16"
or $implementation/XAxis/NumericImplementation/@implType eq "int32"
) and number($implementation/XAxis/NumericImplementation/ImplementationInterval/@min) ge 0
return $implementation
} </myImplementations>