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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:07:25+00:00 2026-05-15T02:07:25+00:00

I know this is a vague open ended question. I’m hoping to get some

  • 0

I know this is a vague open ended question. I’m hoping to get some general direction.

I need to add cXML punchout to an ASP.NET C# site / application. This is replacing something that I wrote years ago in ColdFusion.

I’m a reasonably experienced C# developer but I haven’t done much with XML. There seems to be lots of different options for processing XML in .NET.

Here’s the open ended question: Assuming that I have an XML document in some form, eg a file or a string, what is the best way to read it into my code? I want to get the data and then query databases etc. The cXML document size and our traffic volumes are easily small enough so that loading the a cXML document into memory is not a problem.

Should I:

  1. Manually build classes based on the DTD and use the XML Serializer?

  2. Use a tool to generate classes. There are sample cXML files downloadable from Ariba.com.
    I tried xsd.exe to generate an XSD and then xsd.exe /c to generate classes. When I try to deserialize I get errors because there seems to be "confusion" around whether some elements should be single values or arrays.

I tried the CodeXS online tool but that gives errors in it’s log and errors if I try to deserialize a sample document.

  1. Create a dataset and ReadXml()?

  2. Create a typed dataset and ReadXml()?

  3. Use Linq to XML. I often use Linq to Objects so I’m familiar with Linq in general but I’m struggling to see what it gives me in this situation.

  4. Some other means.

I guess I need to improve my understanding of XML in general but even so … am I missing some obvious way of doing this? In the old ColdFusion site I found a free component ("tag") which basically ignored any schema and read the XML into a "structure" which is essentially a series of nested hash tables which was then easy to read in code. That was probably quite sloppy but it worked.

I also need to generate XML files from my C# objects. Maybe Linq to XML will be good for that. I could start with a default "template" document and manipulate it before saving.

Thanks for any pointers …

  • 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-15T02:07:26+00:00Added an answer on May 15, 2026 at 2:07 am

    If you need to generate arbitrary XML in an exact format, you should generate it manually using LINQ-to-XML.

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

Sidebar

Related Questions

Sorry, for the vague question, don't know actually how to ask this nor the
i know this is a stupid question but i d'ont know how to do
I know this is a frequently asked question and I havent got a clear
I know this isn't the right place to ask about this specific vague problem,
I know that this question seems illogical, but I have to try, and I
I know this has been visited a lot, and I have managed to get
I know this question is asked many a times,and i am also implementing the
I know this question looks like previous questions, but it is slightly different. I
Does anyone know exactly how this value is derived? For half our team it
Anyone know why this is not returning a value? Example $item2['data'] where 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.