CPE Dictionary cpe-item search

What is the correct way to do a string search, without using XPATH / Namespace manager (legacy XP machine, Powershell 2.0)?
I'm new to powershell xml, and am attempting to construct something like that returns only "cpe-item names" containing a specific string. I'm attempting to pull information from the CPE Dictionary.
Example, I'd like to return all "cape:/a: ..." lines that contain the string cisco. I attempted the following, but I don't understand how to properly construct
$nvdxml=[xml]'<root/>'
$nvdxml.load('.\Documents\Scripts.\cpe-dictionary.xml')
$nodes=$nvdxml |?{$_.'cpe-list'[$_.'cpe-item'["cisco"]]}
<?xml version='1.0' encoding='UTF-8'?>
<cpe-list xmlns:meta="http://scap.nist.gov/schema/cpe-dictionary-metadata/0.2" xmlns:config="http://scap.nist.gov/schema/configuration/0.1" xmlns:ns6="http://scap.nist.gov/schema/scap-core/0.1" xmlns:scap-core="http://scap.nist.gov/schema/scap-core/0.3" xmlns="http://cpe.mitre.org/dictionary/2.0" xmlns:cpe-23="http://scap.nist.gov/schema/cpe-extension/2.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://scap.nist.gov/schema/configuration/0.1 http://nvd.nist.gov/schema/configuration_0.1.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd http://scap.nist.gov/schema/scap-core/0.3 http://nvd.nist.gov/schema/scap-core_0.3.xsd http://scap.nist.gov/schema/scap-core/0.1 http://nvd.nist.gov/schema/scap-core_0.1.xsd http://scap.nist.gov/schema/cpe-dictionary-metadata/0.2 http://nvd.nist.gov/schema/cpe-dictionary-metadata_0.2.xsd http://scap.nist.gov/schema/cpe-extension/2.3 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary-extension_2.3.xsd">
<generator>
<product_name>National Vulnerability Database (NVD)</product_name>
<product_version>2.22.0-SNAPSHOT (PRODUCTION)</product_version>
<schema_version>2.3</schema_version>
<timestamp>2014-03-05T05:13:33.550Z</timestamp>
</generator>
<cpe-item name="cpe:/a:1024cms:1024_cms:0.7">
<title xml:lang="en-US">1024cms.org 1024 CMS 0.7</title>
<cpe-23:cpe23-item name="cpe:2.3:a:1024cms:1024_cms:0.7:*:*:*:*:*:*:*"/>
</cpe-item>
<cpe-item name="cpe:/a:1024cms:1024_cms:1.2.5">
<title xml:lang="en-US">1024cms.org 1024 CMS 1.2.5</title>
<cpe-23:cpe23-item name="cpe:2.3:a:1024cms:1024_cms:1.2.5:*:*:*:*:*:*:*"/>
</cpe-item>
<cpe-item name="cpe:/a:1024cms:1024_cms:1.3.1">
<title xml:lang="en-US">1024cms.org 1024 CMS 1.3.1</title>
<cpe-23:cpe23-item name="cpe:2.3:a:1024cms:1024_cms:1.3.1:*:*:*:*:*:*:*"/>
</cpe-item>
<cpe-item name="cpe:/h:zyxel:p-660hw_t3:v2">
<title xml:lang="en-US">ZyXEL P-660HW T3 Model v2</title>
<cpe-23:cpe23-item name="cpe:2.3:h:zyxel:p-660hw_t3:v2:*:*:*:*:*:*:*"/>
</cpe-item>
</cpe-list>

You cannot effectively search XML using that method.  You need to use XPath.  The NVD is a very complex schema and takes time to learn.  you would do better to post quesitons about how to extract information in the NVD forums where the users
have extensive experience with extractions. THey will pointyou at lists of XPAth and XQuery methids that have been devised to access the data.
The NVD databases are a hierarchcal data set and any item can exist at almosst any level andfor many differnt structural reaasons.  String parsing cannot do what you are trying to do with any reliability.
¯\_(ツ)_/¯

Similar Messages

  • Find and item Search not working inside custom list in sharepoint 2013

    HI,
    In Sharepoint 2013 , i configured the Search. it is working in home page search Box and Find item search box  inside custom list as well But one particualr custom list  Find an item is not working. Any clue ?Thanks in Advance
    Thanks
    sanjay pradhan  

    Hi,
    According to your description, my understanding is “find an item” search box in a custom list not work in your environment.
    As search box and “find an item” search box in your home page are working, so the search service application is working.
    Do you have any customzation to the particular custom list ?
    If No, I suggest you can full crawl the data in Central Administration ->Manage Service Application->” Search Service Application”-> Manage Content Sources” to test if it works. 
    Also, please check if you have set "Allow items from this list to appear in search results" in list settings->Advanced Setting to true
    Best Regards
    Jerry Guo
    TechNet Community Support

  • 'Find an Item' search on list with more items than view limit

    Hello all
    The 'Find and Item' search on a list with more items than the view limit appears to filter results according to where you are in that list.  So if I search on the allitems page displaying items 1-100 I get hits from the entire list.  But if I arrow
    through to view items 201-300 and repeat the same search only items from 201 to the end of the list are returned
    I'm assuming this is not how it should work i.e. it should always return results from the whole list.  Is there a way to make that so (other than increasing the view limit to something huge so that all items are always displayed)
    Many Thanks
    Dan

    Hi,
    According to your post, my understanding is that Find an item Search box in List didn't returned any results.
    The problem is due to a difference between the Content Source defined for the crawl and the default zone defined in the Alternate Access mapping.
    You need to change the Alternate Access Mapping configuration.
    For more information, you can refer to:
    http://blog.jonathanroussel.com/2009/01/sharepoint-search-using-this-site-or.html
    http://blog.dafran.ca/post/2011/07/02/SharePoint-does-not-return-any-search-results.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • On-hand & Item Search

    Hi,
    We are getting different value for quantity onhand when I check the onhand quantity on the item search screen. This problem is seen for couple of items now.
    Can anyone tell the reason why?
    Thanks,
    Prasad

    Do you mean the onhand quantity screen displays different value everytime you query for an item.
    Check material transactions for that item, possibly some transaction is happening on the item which is causing change in the quantity.
    http://sureshvaishya.blogspot.com

  • Items Search List error

    Hallo Experts
    After 2007 Upgrade Items search list ( in a document or directly in Item master screen).
    The customers search list is ordered by description.
    When typing 'P' in the Find field the system goes to the last Item starting with 'N' and not items starting with 'P'. All other letters in the alphabet works fine. I have changed the last item starting with an 'N' but then it just highlights the next 'N' item.
    Any sugestions will be much appreciated.
    Kind regards
    Erika

    Hi Erika ,
    All your thread are related with your upgrade scenario.
    I  think your upgrade didn't go well. Probably you need to do the upgrade again .
    I guess you have to do reupgrade .
    You might have to log a support to SAP for further instruction .
    Hope this helps
    Bishal

  • Can Users have their unique Form Settings for the List of Items (Item Search)?

    When any user add and remove columns for the List of Items (Item Search) via Form Settings, these changes are automatically updated for all SAP users.
    Is there any way we that each user have their own unique List of Items form settings?
    This is important as users for different departments will be need to see different information as they are searching for Item Master records.

    Hi Ron,
    This is not Possible.
    Form Setting of Item Master Data will apply for all Users.
    For all Users different Form Settings not Possible but you can guide your users to see while Searching Master Data.
    Hope this helps
    Regards::::
    Atul Chakraborty

  • Oh-hand and item Search

    Hi,
    We are getting different value for quantity onhand when I check the onhand quantity on the item search screen. This problem is seen for couple of items now.
    Can anyone tell the reason why?
    Thanks,
    Prasad

    don't undestand the problme. If there are issues then quantity will be different?

  • Item Search

    Hi,
    I would like to know if an item can be searched by Manufacturer Part Number or Supplier Item Number from the Purchase Requisition and Purchase Order Forms.
    Currently we are able to search only by Item Code, Item Description & UOM.
    Thanks!

    Hello,
    I would really appreciate some help on this.
    If it the Manufacturer Part Number or Supplier Item Number cannot be searched from the Purchase Requisition or Purchase Order Forms; what is the solution that we can look at.
    Can someone suggest something please.... PLEASE
    Thanks.

  • How to turn off right-click dictionary 'look up' search in OS X Lion

    Right-click spotlight search was a very usefull feature in snow leopard, how can I enable this in Lion, I really don't need a dictionary.
    Thanks

    I've created a bug report for this. More information will most likely appear there.
    https://bugzilla.mozilla.org/show_bug.cgi?id=687026

  • Item search based on decision point status

    hi,
    i am trying add items to a review.  i want to add only those items which are in a particular status of a decision point.  Currently, i could not find any option in Add-> search when i am in review screen.  Can there be any configuration through which i can get this or is this going to be a development.
    Pls suggest.

    I don't think there is any configuration to achieve this. Alternatively you can create a custom search help and configure it.
    Regards,
    Ravikanth

  • Portal - Oracle text URL item search error - DRG-11614

    HI,
    I have enabled text searching and created a URL item to http://www.news.com
    I have sync'd the Oracle Text index and on looking at ctxsys.ctx_user_index_errors
    I see
    ERR_INDEX_NAME ERR_TIMES ERR_TEXTKEY
    ERR_TEXT
    WWSBR_URL_CTX_INDX 15-SEP-04 AAAOR8AAGAAAA47AAI
    DRG-11614: URL store: communication with host specified in http://www.news.com t
    imed out
    Can anyone tell me what is causing this?
    Thanks
    Joel.
    (Oracle Portal Version: 9.0.4.0.99)

    Joel
    Does your database host require a proxy in order to be able to contact the website?
    You can set the proxy that Portal uses from the Global Settings pages - there is a link to these from the Services portlet, an instance of which can be found on the Administration tab of the Desgin Time pages.
    Once you've changed the proxy setting you'll need to recreate the URL index so that it can have another go at indexing your website with the Proxy. Please refere to the Search Configuration chapter in the Portal Configuration Guide for more information.
    http://download.oracle.com/docs/cd/B10464_01/portal.904/b10356/toc.htm

  • List Item Search Capability Is only Available in Default Style Views

    Hello,
            I am using SharePoint 2013 and I am impressed with the List Search Capability that is available when you use the Default Style view option.  What I am not impressed with is that the capability in not in all
    the other styles like shaded.  Is there any method that I can use to activate that functionality throughout all of my lists using any type of style like shaded.  For my organization it is a 508 compliance issue.
    Thank You
    PRSharePoint

    Hi,
    It is by default that view styles other than default has no inline Search box. In SharePoint 2013, if you need to customize list view style, you need to use JSlink property to change the fields' view:
    http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013
    http://blog.vgrem.com/2013/04/14/customize-the-rendering-of-a-list-view-in-sharepoint-2013-displaying-list-items-in-accordion/
    http://sharepoint.stackexchange.com/questions/101329/list-styling-in-sharepoint-2013
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • End-user item search limit @ 250, increase?

    Hello,
     I am wondering if there is a way to increase the limit of items returned for a search from 250 to something more?
     Example -
    UserA has a mailbox. 3000+ emails, 1 year worth of data in the Inbox.
    UserA has his Outlook configured in "online" mode (cache disabled). "Improve search speed by limiting the number of results shown" is disabled as well (in the Options > Search). 
    UserA runs a search for letter "a".
    Search returns 250 items - no option to get more at the bottom of search results.
    UserA logs in to OWA.
    Runs a search for letter "a" again.
    OWA returns 250 items and says "If you can't find what you were looking for, please try more specific terms"
     Exception -
    If UserA puts his Outlook in cached mode, and allows it to cache everything, the search (performed locally by the indexer on UserA's machine) will find way more than 250 items.
     This behavior is observed in Outlook 2010 and Outlook 2013.
     This was not an issue when UserA was on Exchange 2010 - when the user clicked "Get More" after the initial results from Search, it would load everything else it found.
     Question - Where on the Exchange server can I modify the setting for this, and is it modifiable?
     Answers similar to "have user use more specific terms" or "have user specify a time range" are not what I am looking for. This worked in 2010 and having to tell the user to use more specific terms will equal to a disaster.
    Please advise, thanks.

    Hello,
    I'm afraid that there is no way to modify the setting.
    Cara Chen
    TechNet Community Support
    You are kidding, right??
    How should I explain this to our users who works on a terminal server?
    Oh my god!!
    We are running Outlook in Online mode on the terminal servers (Best practices).

  • Why has my google seach window changed to Chambers dictionary which only searches itself?

    Since upgrading [or was it really downgrading?] I now have my google search window, top right, replaced by a Chambers Dictionary search, which just takes me to the dictionary! What the hell is going on and how can I get rid of this nonsense and go back to searching the web?

    To help other users find solutions, click on the '''"Solved It"''' button Next to the Reply that BEST solved your Question
    Please DO NOT click "Solved It" next to this reply

  • Sapui5 sap.m.search multiple item search

    Hi All,
              I have a search field in that field i have to enter id means it should search that particular id and if i give name means it should show that particular person name only. please assist me.

    that is not about sap.m.SearchField, that is more about filtering logic in binding i guess.
    in seach event assemble a filter array and pass it to filter function of the binding
    var filterValue = oControlEvent.getParameter("query");
    binding.filter([
                    new sap.ui.model.Filter("userName", sap.ui.model.FilterOperator.EQ, filterValue),
                    new sap.ui.model.Filter("userID", sap.ui.model.FilterOperator.EQ, filterValue)]);

Maybe you are looking for

  • Error comes  while adding a ADF BC/JSP portlet

    Hello all, I built a portlet using ADF BC & JSP,the Provider's Test Page showed successfully. 1)I created an empty project; 2)I created an Business Component from Tables; 3)I created a portlet using Oracle PDK portlet wizard--in the same project whic

  • My ipod nano 7th generation is connected and recognised by my new windows 8 laptop but not recognised as a device on itunes

    Hi.  Can anyone help please.  I have downloaded all my music onto my windows 8 laptop. I have tried to sync my ipod nano but am unable to select 'sync' under 'devices' - doesn't allow me to do so.  Ipod is connected and recognised by my laptop.  Help

  • Original iPhone does not appear in iTunes

    My wife cracked her 3Gs, so while we wait for our new 4Gs to come, I thought I would crank up my original 1st gen for her tto use for a couple weeks. I did a total restore and now when I plug it into iTunes, it will show as a device but nothing appea

  • Cant get on itunes store

    all of the sudden i cannot connect to the itunes store. it says to check my network, but everything else seems to be running fine. what could be the problem ? imac   Mac OS X (10.4.9)  

  • Adobe captivate 7 video capture

    In Adobe Capivate 7 video is captured with 50 frames per sec., but I need 60 frames per sec. for capture. Is there a chance to adjust?