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 7774505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:23:48+00:00 2026-06-01T17:23:48+00:00

<tickets type=array> <ticket> <assigned-user-id type=integer>123</assigned-user-id> <closed type=boolean>true</closed> <creator-id type=integer>177522</creator-id> <number type=integer>306</number> <state>resolved</state> <tag nil=true/>

  • 0
<tickets type="array">
    <ticket>
        <assigned-user-id type="integer">123</assigned-user-id>
        <closed type="boolean">true</closed>
        <creator-id type="integer">177522</creator-id>
        <number type="integer">306</number>
        <state>resolved</state>
        <tag nil="true"/>
        <title>
        title text 1
        </title>
        <updated-at type="datetime">2012-03-14T13:13:11+11:00</updated-at>
        <user-id type="integer">96438</user-id>
        <version type="integer">3</version>
        <user-name>Username</user-name>
    </ticket>
</tickets>

I am a Powershell newbie and find a question on xml and format-table. Given above xml file. If I run below script to display tickets in a table, the value of “number”, “closed” could not be shown

$t = [xml](new-object system.net.webclient).downloadstring($xmlfilepath)
$t.tickets.ticket | Format-Table -Property title, state, user-name, url, number, closed

Return:

title            state       user-name       number       closed                                      
-----            -----       ---------       ------       ------                                
title text 1     resolved    Username        number       closed   
title text 2     resolved    Username        number       closed   

Is it the only way I have to use foreach and selectSingleNode("ticket").get_InnerXml() to get all the values?

Thank you.

  • 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-01T17:23:49+00:00Added an answer on June 1, 2026 at 5:23 pm

    If you notice those nodes have attributes so you will need to get to the data of the node. try the following:

    $t.tickets.ticket | Format-Table -AutoSize -Property title, state, user-name, url,
    @{Label="number"; Expression={$_.number."#text"}},
    @{Label="closed"; Expression={$_.closed."#text"}}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an access DB which we use to track tickets. Each ticket may
The code below returns the number of resolved tickets and the number of opened
I seem to be having a problem with the following file: *User Type 0:
I have an entity ,there is a array type attribute:productKey.I try to add a
I am creating a tickets opened vs resolved per week gadget that reports back
It's very painful to add multiple tickets to Trac or to have it as
I need a Java class to submit tickets to BMC Remedy's Helpdesk product. Wondering
How would one configure trac to allow anonymous submission of tickets?
We use Subversion for version control and Jira for tickets. All our commit messages
I have a page that displays a list of tickets. On each of these

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.