EDN Admin
Well-known member
Hi <br/>
<br/>
My XML-file is as below <br/>
<Server> <br/>
<span style="white-spacere +<Name>myServer</Name><br/>
<span style="white-spacere ++<Instances><br/>
<span style="white-spacere +++<Instance><br/>
<span style="white-spacere ++++<Name>ABC_Instance</Name><br/>
<span style="white-spacere +++++<Databases><br/>
<span style="white-spacere ++++++<Database><br/>
<span style="white-spacere +++++++<Name>testdb</Name><br/>
<span style="white-spacere +++++++++<Tables><br/>
<span style="white-spacere ++++++++++<Table><br/>
<span style="white-spacere +++++++++++<owner><br/>
<span style="white-spacere .<br/>
<span style="white-spacere .<br/>
<span style="white-spacere . <span style="white-spacere .
+++++++++</Table><span style="white-spacere ++++++++</Database><br/>
++++++</Databases><br/>
++++</Instance><br/>
++</Instances><br/>
+</Server><br/>
<span style="white-spacere <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
<br/>
My XML-file is as below <br/>
<Server> <br/>
<span style="white-spacere +<Name>myServer</Name><br/>
<span style="white-spacere ++<Instances><br/>
<span style="white-spacere +++<Instance><br/>
<span style="white-spacere ++++<Name>ABC_Instance</Name><br/>
<span style="white-spacere +++++<Databases><br/>
<span style="white-spacere ++++++<Database><br/>
<span style="white-spacere +++++++<Name>testdb</Name><br/>
<span style="white-spacere +++++++++<Tables><br/>
<span style="white-spacere ++++++++++<Table><br/>
<span style="white-spacere +++++++++++<owner><br/>
<span style="white-spacere .<br/>
<span style="white-spacere .<br/>
<span style="white-spacere . <span style="white-spacere .
+++++++++</Table><span style="white-spacere ++++++++</Database><br/>
++++++</Databases><br/>
++++</Instance><br/>
++</Instances><br/>
+</Server><br/>
<span style="white-spacere <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