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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:43:32+00:00 2026-05-14T16:43:32+00:00

i have not worked with XML in a while can someone post the syntax

  • 0

i have not worked with XML in a while can someone post the syntax needed to build and save an xml node structure that resembles that of a tree structure that is created by a recursive function.

basically i have a recursive function that saves data found an a page(url) and then follows each URL found on that page recursivley and does the same to it. to audit this i want an output as a xml file to disk so i can see how it is doing its recursion and parsing.

the code i have is below. please add to it the needed xml calls needed to create a xml structure like the one i show below. (please include the full name space so i can see where the objects i need in .net are for this.)

page1.htm has 2 links on it:

<a href=page1_1.htm>
<a href=page1_2.htm>

page1_1.htm has 2 links on it

<a href=page1_1_a.htm> (this then will have some links also)
<a href=page1_1_b.htm> (this then will have no more links on it - dead end)

the xml should do something like this:

<node url=page1.htm>
    ...<node url=page1_1_a.htm>
       ......    <node url="xxx.htm"/>
       ......    <node url="yyy.htm".>
    ... </node>
    ...<node url=page1_1_b.htm />

</node>
  • 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-14T16:43:33+00:00Added an answer on May 14, 2026 at 4:43 pm

    I have this XML document to be generated on the fly at run-time.

    <?xml version="1.0" encoding="utf-8"?>
    <wap-provisioningdoc>
      <characteristic type="BOOTSTRAP">
        <parm name="NAME" value="SYNCSETTINGS" />
      </characteristic>
      <characteristic type="APPLICATION">
        <parm name="APPID" value="w5" />
        <parm name="TO-NAPID" value="INTERNET" />
        <parm name="NAME" value="SYNCSETTINGS" />
        <parm name="ADDR" value="http://syncserver/sync" />
        <characteristic type="RESOURCE">
          <parm name="URI" value="pb" />
          <parm name="NAME" value="Contacts DB" />
          <parm name="AACCEPT" value="text/x-vcard" />
        </characteristic>
        <characteristic type="RESOURCE">
          <parm name="URI" value="cal" />
          <parm name="NAME" value="Calendar DB" />
          <parm name="AACCEPT" value="text/x-vcalendar" />
        </characteristic>
        <characteristic type="RESOURCE">
          <parm name="URI" value="notes" />
          <parm name="NAME" value="Notes DB" />
          <parm name="AACCEPT" value="text/plain" />
        </characteristic>
        <characteristic type="APPAUTH">
          <parm name="AAUTHNAME" value="username" />
          <parm name="AAUTHSECRET" value="password" />
        </characteristic>
      </characteristic>
    </wap-provisioningdoc>
    

    This is how I generated this XML document using C# 3.0 and Linq.

    public string CreateOTAXmlFile(string Username, string Password)
        {
            var ota = new XDocument(
                        new XElement("wap-provisioningdoc",
                            new XElement("characteristic", new XAttribute("type", "BOOTSTRAP"),
                                new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "SYNCSETTINGS"))
                                        ),
                            new XElement("characteristic", new XAttribute("type", "APPLICATION"),
                                new XElement("parm", new XAttribute("name", "APPID"), new XAttribute("value", "w5")),
                                new XElement("parm", new XAttribute("name", "TO-NAPID"), new XAttribute("value", "INTERNET")),
                                new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "SYNCSETTINGS")),
                                new XElement("parm", new XAttribute("name", "ADDR"), new XAttribute("value", "http://syncserver/sync")),
                                new XElement("characteristic", new XAttribute("type", "RESOURCE"),
                                    new XElement("parm", new XAttribute("name", "URI"), new XAttribute("value", "pb")),
                                    new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "Contacts DB")),
                                    new XElement("parm", new XAttribute("name", "AACCEPT"), new XAttribute("value", "text/x-vcard"))
                                            ),
                                new XElement("characteristic", new XAttribute("type", "RESOURCE"),
                                    new XElement("parm", new XAttribute("name", "URI"), new XAttribute("value", "cal")),
                                    new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "Calendar DB")),
                                    new XElement("parm", new XAttribute("name", "AACCEPT"), new XAttribute("value", "text/x-vcalendar"))
                                            ),
                                new XElement("characteristic", new XAttribute("type", "RESOURCE"),
                                    new XElement("parm", new XAttribute("name", "URI"), new XAttribute("value", "notes")),
                                    new XElement("parm", new XAttribute("name", "NAME"), new XAttribute("value", "Notes DB")),
                                    new XElement("parm", new XAttribute("name", "AACCEPT"), new XAttribute("value", "text/plain"))
                                            ),
                                new XElement("characteristic", new XAttribute("type", "APPAUTH"),
                                    new XElement("parm", new XAttribute("name", "AAUTHNAME"), new XAttribute("value", Username)),
                                    new XElement("parm", new XAttribute("name", "AAUTHSECRET"), new XAttribute("value", Password))
                                            )
                                        )
                                    )
                                );
    
            ota.Save(Server.MapPath("~/OTA/") + Username + ".xml");
            return (ota.ToString());
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 420k
  • Answers 420k
  • 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 One reason, is to "grab" the output of a small… May 15, 2026 at 10:32 am
  • Editorial Team
    Editorial Team added an answer You apparently are not referencing the DLL correctly. I am… May 15, 2026 at 10:32 am
  • Editorial Team
    Editorial Team added an answer Copy from the docs mysql_connect("localhost", "mysql_user", "mysql_password") or die("Could not… May 15, 2026 at 10:32 am

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.