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

Ask your Windows 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.
Locked
Ras110e5
Posts: 1
Joined: Wed Jan 30, 2019 2:13 am

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

Post by Ras110e5 » Mon Feb 25, 2019 6:26 am

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: 13882
Joined: Tue May 22, 2007 9:57 am
Contact:

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

Post by jvierra » Mon Feb 25, 2019 12:37 pm

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.

Locked