This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$xml = [XML](Get-Content .\Test.xml) | |
$xml.root.node[0].subNode | |
Select-Xml -Path .\TestPage.xhtml -XPath //h1 | | |
ForEach-Object { $_.Node } | Format-Table -AutoSize InnerText, ParentNode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select-Xml -Path .\TestPage.xhtml -XPath "//h1[@id = 'title']" | |
Select-Xml -Path .\TestPage.xhtml -XPath "//x:h1[@id = 'title']" -Namespace @{ | |
x = 'http://www.w3.org/1999/xhtml' | |
} | ForEach-Object { $_.Node } | Format-Table -AutoSize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$addressUp = @' | |
//host/address[ | |
@addrtype = 'ipv4' and | |
../status/@state = 'up' | |
] | |
'@ | |
$nodeList = Select-Xml -Path .\testLocal.xml -XPath $addressUp | | |
ForEach-Object { $_.Node } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select-Xml -Path .\Test.xml -XPath "//subNode[@Number > 1]" | | |
ForEach-Object { $_.Node } | |
Select-Xml -Path .\TestPage.xhtml -XPath "//*[contains(@id,'test')]" | | |
ForEach-Object { $_.Node } | |
$xpath = @' | |
//*[ | |
contains( | |
name(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$caseInsensitive = @' | |
//node[ | |
translate(@Name, "FIRST", "first") = 'first' | |
] | |
'@ | |
Select-Xml -XPath $caseInsensitive -Path .\Test.xml | | |
ForEach-Object { $_.Node.Name } | |
$almostRegex = @' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Common = @{ | |
Path = 'SomeTables.xhtml' | |
Namespace = @{ | |
d = 'http://www.w3.org/1999/xhtml' | |
} | |
} | |
Select-Xml -XPath '//d:table[d:tr[@class]]' @Common | | |
ForEach-Object { $_.Node } | Format-Table -AutoSize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration LinuxDscDemo { | |
param ( | |
[string]$ComputerName | |
) | |
Import-DscResource -Module nx | |
Node $ComputerName { | |
nxUser LinuxDsc { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Template = @' | |
{Name*:霧嶋 董香} | |
{City:Redmond}, {State:WA} | |
{Name*:Łukasz Ćwikalski} | |
{City:ワルシャワ}, {State:PL} | |
'@ | |
$Data = @' | |
霧嶋 董香 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$data = @' | |
= | |
Adam Nowacki | |
Domowy:123 456 789 | |
Praca:999 999 999 | |
[prywatny/[email protected]] | |
[sluzbowy/[email protected]] | |
= | |
Anna Kowalska | |
Domowy:123 456 789 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
List taken from SO answer: | |
http://stackoverflow.com/questions/4730152/what-indicates-an-office-open-xml-cell-contains-a-date-time-value | |
#> | |
$ExCellStyles = @{ | |
0 = 'General' | |
1 = '0' | |
2 = '0.00' | |
3 = '#,##0' |
OlderNewer