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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:29:55+00:00 2026-05-16T05:29:55+00:00

This is my first steps with XML and I must send a XML by

  • 0

This is my first steps with XML and I must send a XML by HttpRequest (Which is not a problem to me now). By I’ve a question about DTDs. According to the HttpRequest destination APIs, I must validate my XML using an External DTD whos located there (this is for Canada Post shipping : http://cybervente.postescanada.ca/DevelopersResources/protocolV3/eParcel.dtd). I know how to write / read XML, but not according to DTD… Is there a difference?

Can someone tell me how and the easiest way to do that? I’ve look a good part of good post from Google and there’s never what I’m looking for …

Thank you!

ADD #1

Note : I know what a DTD for, and I can create one on my own with a plain text editor and basing the XML on the DTD, but I realy mean, is there a way to take advantage of DTD in C# (Creating an object or someting…)

ADD #2
Add-on : Any of you guys already set up an application to talk to Canada Post API using webresque? Because I’m stunk! I send my request with my data and it never finish so never return response … here is my code :

public oShippingResponse RetreiveShippingCost(oShippingInformations shipInfos) {
        // Send request                             
        WebRequest request = WebRequest.Create("http://sellonline.canadapost.ca");
        XmlDocument xmlDoc = shipInfos.WriteAsXML();
        request.ContentType = "text/xml";
        request.Method = "POST";

        xmlDoc.Save(request.GetRequestStream());
        try {
            WebResponse response = request.GetResponse();
        } catch (Exception ex) {
            throw ex;
        }
        return new oShippingResponse();
    }
  • 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-16T05:29:56+00:00Added an answer on May 16, 2026 at 5:29 am

    No, there is no difference in how you write your XML, other than that you should obey the rules laid out in the DTD. Understanding and reading a DTD is an art, so I hope that Canada Post has a more descriptive way of explaining the format to you to aid you in creating the correct XML.

    Then, what Canada Post requests, you should validate your XML against the DTD. While being valid doesn’t mean that the input is correct, it should warn you early about invalid input. And that’s precisely why they want you to do this: if your output is guaranteed correct against the DTD, they can guarantee you that they can process the input (in most cases, at least).

    Here’s how you can validate your input against a DTD using C# on Microsoft Support.

    Note on editing the XML by hand: most XML editors are capable of reading a DTD and warning you that the DTD is correct, or even give you syntax help while you type, i.e. in Visual Studio. The XML standard demands that if a DTD is present in the header of the XML, the XML itself must be validated and must not be processed if not valid against the DTD.

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

Sidebar

Ask A Question

Stats

  • Questions 542k
  • Answers 542k
  • 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 The target cannot be self. The target has to be… May 17, 2026 at 6:13 am
  • Editorial Team
    Editorial Team added an answer The simplest solution would be for your second instance of… May 17, 2026 at 6:13 am
  • Editorial Team
    Editorial Team added an answer The subsequent .ts files are probably fine, you just need… May 17, 2026 at 6:13 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

Related Questions

after processing my first steps in working with XML in java I am now
I am taking my first steps programming in Lua and get this error when
problem euler #5 i found the solution but i don't know why this first
this is my first question to stackoverflow so here it goes... I use cruise
this is my first question here so I hope I can articulate it well
This project is the probable first step in migrating a large CMS from Classic
This is my first post here and I wanted to get some input from
This is my first experience using the Zend Framework. I am attempting to follow
This is my first time attempting to call an ASP.NET page method from jQuery.
This is my first time using joomla. I don't know if I'm using the

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.