selectSingleNode Case sensitive ..

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi <br/>
<br/>
My XML-file is as below <br/>
<Server> <br/>
<span style="white-space:pre +<Name>myServer</Name><br/>
<span style="white-space:pre ++<Instances><br/>
<span style="white-space:pre +++<Instance><br/>
<span style="white-space:pre ++++<Name>ABC_Instance</Name><br/>
<span style="white-space:pre +++++<Databases><br/>
<span style="white-space:pre ++++++<Database><br/>
<span style="white-space:pre +++++++<Name>testdb</Name><br/>
<span style="white-space:pre +++++++++<Tables><br/>
<span style="white-space:pre ++++++++++<Table><br/>
<span style="white-space:pre +++++++++++<owner><br/>
<span style="white-space:pre .<br/>
<span style="white-space:pre .<br/>
<span style="white-space:pre . <span style="white-space:pre .
+++++++++</Table><span style="white-space:pre ++++++++</Database><br/>
++++++</Databases><br/>
++++</Instance><br/>
++</Instances><br/>
+</Server><br/>
<span style="white-space:pre <br/>
Now i need to find specific database node. I need to do a case insensitive comparision <br/>
i.e If I pass the below string as argument to searchString() it returns NULL <br/>
//SQLServerRepository/Server[Name="MyServer"]/Instances/Instance[Name="ABC_Instance"]/Databases/Database[Name="[translate(., ABCDEFGHIJKLMNOPQRSTUVWXYZ, abcdefghijklmnopqrstuvwxyz)= TestDB]"]<br/>
//SQLServerRepository/Server[Name="MyServer"]/Instances/Instance[Name="ABC_Instance"]/Databases/Database[Name="[translate(., ABCDEFGHIJKLMNOPQRSTUVWXYZ, abcdefghijklmnopqrstuvwxyz)= testDB]"]<br/>
//SQLServerRepository/Server[Name="MyServer"]/Instances/Instance[Name="ABC_Instance"]/Databases/Database[Name="[translate(., ABCDEFGHIJKLMNOPQRSTUVWXYZ, abcdefghijklmnopqrstuvwxyz)= TESTDB]"]<br/>
//SQLServerRepository/Server[Name="MyServer"]/Instances/Instance[Name="ABC_Instance"]/Databases/Database[Name="[translate(., ABCDEFGHIJKLMNOPQRSTUVWXYZ, abcdefghijklmnopqrstuvwxyz)= testdb]"]<br/>
<br/>
Only the last search string where the db matches with that in XML returns properly all others returns NULL. Can I know where i am going wrong with this. <br/>
<br/>
Thanks <br/>
Santosh.B.B.<br/>
<br/>


View the full article
 

Similar threads

D
Replies
0
Views
104
Donald Uko
D
S
Replies
0
Views
106
Stan Huang at Taiwan
S
S
Replies
0
Views
124
Sampath Gamaarchchi
S
Back
Top