Is there a setting or pluging for Powesrhell studio to respect the xml namespace?

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
Ras110e5
Posts: 1
Last visit: Mon Oct 05, 2020 12:40 pm

Is there a setting or pluging for Powesrhell studio to respect the xml namespace?

Post by Ras110e5 »

Hello all,

I'm working on a project that uses XML files to import its configuration, but I noticed that Powershell Studio indifference to Visual Studio / Code doesn't mark an error when the XML goes against the namespace.
Is there a way to add this functionality to Powershell Studio?

Thanks in advance.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Is there a setting or pluging for Powesrhell studio to respect the xml namespace?

Post by jvierra »

In PowerShell, if you use XML/XPath to edit XML any errors that you force will cause an exception.

If there are namespace violations an exception will be thrown when the XML is loaded.
This topic is 5 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked