I am trying to return information from a text file that would be located in the middle of a line (I don’t want the information before or after). The problem being is that the same line might be repeated multiple times. There are quotes in my text file also, to make searching harder
example
I would like to get 8/10/2009 - Version 8.3.0.3320A from this, without the "/> at end
Is this an xml-structured file? If so, it would probably be a lot easier to parse out the values you want using the xml inspectors. If it is xml, can you post a sample of what the complete file might look like? I should be able to help with the relevance.
The file is an XML, but the file is 1/2 mb large, so I took some lines from the XML to give you an example. If you need the whole file, I will upload it.
Where can I find a list of XML Inspectors for future use
That’s a big file and I don’t really need all of it. I really only need an example of all the parent XML tags (AKA elements) that are in it so that I can make sure that the select is right. For example, this would be helpful:
That works great, but does not really solve my issue. What if I want to get the Value of <property name="ProductName which will vary, but this time I want the value “Embedded NEC98431” and not “Proliant BL20P” or “NoValue” from the following…?
(BTW - I copied and pasted parts of XML so it might be missing a tag)
I’m a bit confused about what output you would like from that second xml document. Could you give us some context about the problem you’re trying to solve and what information you’d like returned from the query?
Maybe it is because I don’t fully understand this XML parsing, but here we go.
As you can see the entry and
both contain <property name=“productName” caption=“Nom du produit” but have different value=, and are located in different sections of the XML file. I am trying to get information from one but not from the other, so I can put it in an analysis and see all the hardware that is on my servers, which BigFix does not supply out of the box.
Hope this helps, I can supply more info if needed.
Seems like the information that I am looking for is in post http://forum.bigfix.com/viewtopic.php?id=1542, but now I am trying to modify the results to produce strings, not numerical values
node values of attributes “value” of xpaths “/diagOutput/category/device/structure/property”
whose
(
node value of attribute “name” of it = “IPAddress”
I understand what you’re looking for. How does this look:
node values of attributes
"value" of xpaths
"//property" whose ( node value of attribute
"name" of it as lowercase =
"productname" and (node value of attribute
"value" of it as lowercase !=
"novalue") and (node value of attribute
"value" of it as lowercase !=
"proliant bl20p g3") ) of xml document of file
"c:\test.xml"
I am very new at this and need to search for value in an xml file . The file is below with the value; 5th line from the bottom (). Can you help? Once I find it, I’ll want to modify it to read
This is a bit above me. Maybe it can’t even be done but any insight would be appreciated.