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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:13:14+00:00 2026-06-13T00:13:14+00:00

Hi what will the best possible way to represent a graph in XML, where

  • 0

Hi what will the best possible way to represent a graph in XML, where a node can be the child of a parent node and may be the parent of another child node. It can refer to itself, and multiple nodes can have same parent. And a node can have multiple parents.
All nodes are from same class. I want to build it efficiently, so that if I can learn about a child node from a parent node I can go to the specific child tag without having to iterate all the nodes. Is it possible?
for example here is an overview,

A->B,C,D

B->C,D

it may look like

<Node name=A>
 <childNode name=B>
 <childNode name=C>
 <childNode name=D>
</Node>

<Node name=B>
 <childNode name=C>
 <childNode name=D>
</Node>

So are there any better approaches than this? Whenever I get a child from A i.e. B, than I will have to basically iterate through all Nodes and match there name attribute with B to find the Node that represents B. Can I somehow do it faster?

  • 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-13T00:13:15+00:00Added an answer on June 13, 2026 at 12:13 am

    Since you have a graph, and not a tree as you first thought, why not use GraphML?

    GraphML is a comprehensive and easy-to-use file format for graphs. It
    consists of a language core to describe the structural properties of a
    graph and a flexible extension mechanism to add application-specific
    data.

    Unlike many other file formats for graphs, GraphML does not use a
    custom syntax. Instead, it is based on XML and hence ideally suited as
    a common denominator for all kinds of services generating, archiving,
    or processing graphs.

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

Sidebar

Related Questions

I may not be asking this in the best way possible but i will
This will probably be obvious but I can't find the best way. I want
Possible Duplicate: Nullable values in C++ What is the best way to represent nullable
What will be the best possible way to create Custom Scrollbars using Javascript? Thanks
I got this question from my cousin: What will be the best way to
Okay, so this one may be difficult but I will do my best to
I will try and word this question the best I can, for it is
I will try and set the scene as best i can. *lights candle What
What is the best way to write a function (or something DSLish) that will
Hopefully this explanation will make sense, but what is the best way (if it

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.