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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:03:42+00:00 2026-05-23T04:03:42+00:00

I am new to Xpath and am trying to parse a UML model saved

  • 0

I am new to Xpath and am trying to parse a UML model saved in XML format.
I have some nodes in the form :-

<ModelProfile:create xmi:id='_16_0_1_187c046a_1307545286478_527165_409' base_Element='_16_0_1_187c046a_1307545286478_986851_398'/>

<ModelProfile:get xmi:id='_16_0_1_187c046a_1307545286478_698482_412' base_Element='_16_0_1_187c046a_1307545286478_639036_401'/>

I have the base_Element value and know that the nodes begin with ModelProfile: , but I need to get what the value after the ModelProfile: string is – i.e. the word "get" or "create" in the above 2 examples.

How can I do this in Xpath (in Java)?

Thanks

Sarah

  • 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-05-23T04:03:43+00:00Added an answer on May 23, 2026 at 4:03 am

    Assuming you have registered the ModelProfile namespace URI, you can use:

    "//ModelProfile:*[@base_Element='" + yourBaseElementValue + "']"
    

    to get all nodes with that particular base_Element attribute value.

    From there on you can use the nodeName property of the returned nodes.

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

Sidebar

Related Questions

I am trying to parse some xml with saxon to make some xpath querying
I'm trying to parse an xml file using XPath DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); domFactory.setNamespaceAware(true);
So I have some perl code that goes something like: use strict; use XML::XPath;
I'm trying to parse some XML from the USGS. Here's an example The parameterCd
I'm trying to use XPath to parse an XML string but I am getting
I'm trying to parse an Atom feed programmatically. I have the atom XML downloaded
New to xml. Looking for XPath to search a xml file with python ElementTree
<?php $feed = file_get_contents('http://thexmofo.wordpress.com/feed/'); $xml = new SimpleXMLElement($feed); $xml->registerXPathNamespace('media', 'http://thexmofo.wordpress.com/feed/'); $images = $xml->xpath('/rss/channel/item/media:content@url'); var_dump($images);
I am trying to parse a dom element. Element element: <?xml version=1.0 encoding=UTF-8?> <feed
I'm trying to get the value of a hidden form with xpath, there are

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.