Jump to content

Search the Community

Showing results for tags 'contains not working'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello all. I have a question about XML parsing and xpath. I am extremely new to both so apologies if this is a basic question. I did search the forum and this link on w3schools as well as the MSDN documentation. I was working from (which was extemely helpful). Here is my problem: I can find a specific named node and then get some info from it which I need. However, I am having trouble finding that node with an alternative approach using "contains" to search for any node that contains a subset of the tag name. Here is the problem in code-speak: #Include #Include $oXML=ObjCreate("Microsoft.XMLDOM") $DirInput =@ScriptDir $FileInput = "in-20120401.xml" $sXmlFile =$DirInput & "\" & $FileInput $oXML.load($sXmlFile) $searchTerm="us-gaap:DeferredRevenueCurrent"; $XmlRootPath = "//"&$searchTerm ; ;LOOKING TO REPLICATE THIS RESULT USING CONTAINS FUNCTION: ;$searchTerm="us-gaap:DeferredRevenueCurrent"; ;$XmlRootPath = "//"&$searchTerm ;dim $result2=$oXML.selectNodes($XmlRootPath) ;THE ABOVE WORKS ... BUT I CAN'T "FIND" IT USING CONTAINS as below dim $result2=$oXML.selectNodes("//*[contains(.,'DeferredRevenueCurrent')]") func _advancedQuery() dim $xpathresult For $xpathresult In $result2 ConsoleWrite($xpathresult.nodeName&@CRLF) Next EndFunc _advancedQuery() I am also attaching the XML file that I am using. Any help anyone could offer would be greatly appreciated. in-20120401.xml
×
×
  • Create New...