binary search tree and xml

This is a discussion on binary search tree and xml within the C++ Programming forums, part of the General Programming Boards category; I have 2 questions: 1) I have a binary search tree which needs to be loaded up with an ontology ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    94

    Lightbulb binary search tree and xml

    I have 2 questions:

    1) I have a binary search tree which needs to be loaded up with an ontology list which is in xml but have no idea as to how I can achieve this. I am a c++ programmer and dont know very much about xml. The following is a sample of the xml

    Code:
    <Classification ID="39"> <ClassificationFormalName>Education:Secondary :All</ClassificationFormalName> 
    <ClassificationBroad>Education</ClassificationBroad> 
    <ClassificationSecondary>Secondary</ClassificationSecondary> 
    <ClassificationName>All</ClassificationName> 
    <ClassificationID>19729</ClassificationID>
    Does anyone know if there is a way of reading xml info into a c++ BSTree. I cant find anything.

    2) I also need to create a web interface in which the user writes some text and then I need to be able to read some of the words into a c++ BSTree. Again I have no idea of how to go about it.

    I have literally got the c++ code done but dont know where I can get some info relating to my questions. Any help will be greatly appreciated.

    Thanx
    Sophie
    simple is always an understatement.....

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Does anyone know if there is a way of reading xml info into a c++ BSTree.
    I would imagine you need to parse the XML file to separate the individual records and then insert them into your tree. Search google for ways to parse XML. There are plenty of libraries available.

    >Again I have no idea of how to go about it.
    CGI I assume? Simply read from standard input. That will get you the user's data, then you can parse it for the items you want and insert those items into the tree.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compressing XML data using Lniq and GZipStream
    By Aeixious in forum C# Programming
    Replies: 2
    Last Post: 01-22-2009, 10:48 PM
  2. XML writing and bzr hanging
    By dwks in forum Tech Board
    Replies: 3
    Last Post: 06-16-2008, 04:31 PM
  3. Need help with this xml tree example
    By kzar in forum C Programming
    Replies: 1
    Last Post: 11-22-2004, 11:23 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21