Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:05:05+00:00 2026-06-03T11:05:05+00:00

So let’s say I’ve got a simple XML document like this: <a> <b> <c>blah</c>

  • 0

So let’s say I’ve got a simple XML document like this:

<a>
  <b>
   <c>blah</c>
   <c>blah</c>
   <d>blargh</d>
  </b>
</a>

I want to select “c” elements.

Here is what I believe should work:

Select-Xml -Xml $XmlDoc -XPath '//c';

Although this example itself works, this similar concept is not returning anything in this XML document:

<?xml version="1.0" encoding="utf-8"?>
<Response xmlns="http://schemas.microsoft.com/search/local/ws/rest/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Copyright>Copyright © 2012 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.</Copyright>
  <BrandLogoUri>http://dev.virtualearth.net/Branding/logo_powered_by.png</BrandLogoUri>
  <StatusCode>200</StatusCode>
  <StatusDescription>OK</StatusDescription>
  <AuthenticationResultCode>ValidCredentials</AuthenticationResultCode>
  <TraceId>985236ecd4b04793ac26f72a218a3876|LAXM001505|02.00.127.100|</TraceId>
  <ResourceSets>
    <ResourceSet>
      <EstimatedTotal>1</EstimatedTotal>
      <Resources>
        <TrafficIncident>
          <Point>
            <Latitude>41.82048</Latitude>
            <Longitude>-88.20378</Longitude>
          </Point>
          <IncidentId>1</IncidentId>
          <LastModifiedUTC>2012-05-01T16:17:15.663Z</LastModifiedUTC>
          <StartTimeUTC>2011-05-01T19:46:00Z</StartTimeUTC>
          <EndTimeUTC>2012-11-11T14:00:00Z</EndTimeUTC>
          <Type>Construction</Type>
          <Severity>Minor</Severity>
          <Verified>true</Verified>
          <RoadClosed>false</RoadClosed>
          <Description>description here</Description>
          <DetourInfo />
          <LaneInfo>lane blockages possible</LaneInfo>
          <CongestionInfo />
        </TrafficIncident>
      </Resources>
    </ResourceSet>
  </ResourceSets>
</Response>

Does anyone know the proper syntax to select TrafficIncident elements without necessarily specifying the full path?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:05:07+00:00Added an answer on June 3, 2026 at 11:05 am

    The elements are in a namespace, so you need to search for them in that namespace. Google for “XPath default namespace”, it’s the number 1 FAQ.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let’s say I have a number like 0x448 . In binary this is 0100
Let's say I can call a method like this: core::get() . What is the
Let's say I have a text file composed like this ##### typeofthread1 ##### typeofthread2
Let's say I have table with column 'URL' whrere I store urls like this
Let's say that I have a set of relations that looks like this: relations
Let's say I have some json like this in mongo: {n:5} and a java
let's say im returning a datetime string like this in JS: 8/18/2010 9:35:27 AM
Let's suppose I have an XML file like this: <?xml version=1.0 encoding=ISO-8859-1?> <MIDIFile> <Event>
Let's say on a page I have alot of this repeated: <div class=entry> <h4>Magic:</h4>
Let's say there is a graph and some set of functions like: create-node ::

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.