AnandDuddella
Programmer
Hi I am suing Vb Script regular expression to search for a string in xml file but it does not work always please do let me know any better idea exists
'=======================================================================================
Function check_ObjectLabel_exists(strObjectPath,sourceDoc)
Dim colMatches,ObjRegExp
Dim xmlContainerForQuickSearch
Set ObjRegExp = New RegExp
Set xmlContainerForQuickSearch = Create_XML_DOM_Structure_WithEmbed_HTML_DOM(sourceDoc)
' This above functions loads an html file into xml so that i can do a quick search
ObjRegExp.Pattern = Trim(strObjectPath)
'strObjectpath is the string i am searching for
ObjRegExp.Global = True
ObjRegExp.IgnoreCase = True
Set colMatches = ObjRegExp.Execute(Replace(xmlContainerForQuickSearch.text," ",""))
check_ObjectLabel_exists = colMatches.count
End Function
'=======================================================================================
Function check_ObjectLabel_exists(strObjectPath,sourceDoc)
Dim colMatches,ObjRegExp
Dim xmlContainerForQuickSearch
Set ObjRegExp = New RegExp
Set xmlContainerForQuickSearch = Create_XML_DOM_Structure_WithEmbed_HTML_DOM(sourceDoc)
' This above functions loads an html file into xml so that i can do a quick search
ObjRegExp.Pattern = Trim(strObjectPath)
'strObjectpath is the string i am searching for
ObjRegExp.Global = True
ObjRegExp.IgnoreCase = True
Set colMatches = ObjRegExp.Execute(Replace(xmlContainerForQuickSearch.text," ",""))
check_ObjectLabel_exists = colMatches.count
End Function