-
Hi, I did not find a way how to get data from multiple column in one xml file. $x.XMLOUT.Check[0].Detail.UpdateData | where {$_.IsInstalled.startsWith("false")} | foreach {"Title =" + $_.Title + "URL= " + $_.References.DownloadURL } its wrks, but I need somehow convince...
-
Hi, I'm trying to parse xml files in a directory with the following script. For example, in the xml i have data that looks like the following called service.xml displayName="blahblahblah" get-childitem -Path c:\service.xml | foreach { [xml]$xml=get-content $_; if ($xml.config.service.displayname...
-
XML format: <transcript> <messages> <message> <to></to> <from></from> <body></body> <date></date> </message> </messages> </transcript> $chat = [xml] (get-content "xmlfile.xml") Foreach ($msg in $chat) {write...
-
hello I have a problem I have a file that generates a long list of data, every 3 lines is 1 chunk og data e.g 1..3 line = data chunk 1 4..6 line = data chunk 2 ... .. . 51..54 line data chunk x ect….. I run a do until but I cant get it to work proberly $XmpPrep = @( Get-Content C:\pstmp\RAW\xmlprep...
-
Hello together, I have an XML-File with a content like this: <?xml version="1.0" ?> <objects> <cn>Share1</cn> <ownership> <role type=" OWNER " sAMAccountName=" Userid_Owner1 " /> <role type=" DELEGATE " sAMAccountName="...
-
The code below runs fine on PowerShell versions 2.0 and 3.0 when using Data.xml Example 1. However, if I introduce a second category as seen in Data.xml Example 2, the code continues to work in PowerShell 3.0, but fails to produce any output or an error in PowerShell 2.0. Why might this be? $xml = [xml...
-
Hi All! This is may very first post here... :-) I'm facing issues when reading an XML file when the XML elements have not all the same information. The XML file is not constructed by me, I cannot modify its structure. I guess that when reading the XML file into an object, the object is created on...
-
Hello Tobias, Thank you very much, that is exactly what I needed, from here I should be able to extract the information I need on a per layer basis. Thank you for your help, it is greatly appreciated Robert Burke
-
Can we expand on this thread and get a tool set going. I have several tasks that could leverage this capability but I have had issues with cdata sections and altering attributes. Consider Web.config thumbprint values
-
Serge van den Oever has written a PowerShell script that converts an input text file into an output xml file. You can read the script at the following link: http://weblogs.asp.net/soever/default.aspx