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

  • Home
  • SEARCH
  • 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 49395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:25:48+00:00 2026-05-10T16:25:48+00:00

I am having the problem that I cannot select a specific XML node which

  • 0

I am having the problem that I cannot select a specific XML node which needs to be deleted. I have already tried to select the node by using the XPath which works fine for some XML files but I cannot figure out the correct XPath for a node in a more complex file.

Does anybody know a freeware tool which can load a XML file so that the user can select a specific node and receives the accurate XPath without having an enumeration in the path?

/root/anything[2] <– unfortunatly I cannot use such a statement because the number of the element might change. I need an expression that is based on an attribute.

In case that there is no freeware tool for this operation, does anybody know another way how I can select the needed node?

XML Sample:

Root Node: SmsFormData

Attributes: xmlns:xsi=’http://www.w3.org/2001/XMLSchema-instance&#8217; xmlns:xsd=’http://www.w3.org/2001/XMLSchema&#8217; FormatVersion=’1.0′ xmlns=’http://schemas.microsoft.com/SystemsManagementServer/2005/03/ConsoleFramework&#8217;

Child node: Form

Attributes: Id=’some GUID’ CustomData=’Some data’ FormType=’some type’ ForceRefresh=’false’

Child/Child node: Pages

Child/Child/Child node: Page

Attributes: VendorId=’VendorName’ Id=’some GUID’ Assembly=’dll File name’ Namespace=’some Namespace’ Type=’some Type’ HelpID=”>

My xPath expression to select this specific page would now be:

xPath = /SmsFormData/Form/Pages/Page[@Id='some Guid']

To do the selection I am using the following vbscript code:

Set objDOM = CreateObject('Msxml2.DOMDocument.4.0')  objDOM.async = false             objDOM.load(file)        set objNode = objDOM.selectSingleNode(xPath) 

The problem is now that the objNode object is empty. The node is not selected, but why?

  • 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. 2026-05-10T16:25:48+00:00Added an answer on May 10, 2026 at 4:25 pm

    This is a default namespace issue. Try including the following code after you load in the XML:

    objDom.SetProperty 'SelectionNamespaces', 'xmlns:cf=''http://schemas.microsoft.com/SystemsManagementServer/2005/03/ConsoleFramework''' 

    You then use this cf prefix in your XPath eg:

    objDom.SelectSingleNode('/cf:SmsFormData/cf:Form/cf:Pages/cf:Page[@Id='Some Guid']') 

    Whilst this may seem a bit quirky, it is intentional behaviour. Take a look at http://support.microsoft.com/kb/288147 for more information, and you may find http://msdn.microsoft.com/en-us/library/ms950779.aspx useful as well.

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

Sidebar

Ask A Question

Stats

  • Questions 197k
  • Answers 197k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer less<vector<Node*>::value_type> Means that your comparator compares the pointers to each… May 12, 2026 at 7:22 pm
  • Editorial Team
    Editorial Team added an answer No, cassini can only be accessed from the machine it… May 12, 2026 at 7:22 pm
  • Editorial Team
    Editorial Team added an answer This question was already answered: How to replace the company… May 12, 2026 at 7:22 pm

Related Questions

So the main program is in C#. Inserting new records into a VFP database
I am having a problem with LINQ and I was hoping someone could explain
I would like to load variables from a text file. For example, my text
I am converting an application from BDE to ADO. Under the BDE, if a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.