Create XML Reader in C for Sun Machine

In summary, the individual needs to write a routine in C to read in CSV data and append it into an XML template. They are not allowed to use C# or C++ and are running it on a Sun machine. Their team has come up with a reader for the nodes of the XML, but they have been unable to find a reader for C on various websites. They mention that using fscanf() or getline() and sscanf() could be helpful if the format of the CSV file is known.
  • #1
db1uover
16
0
I have to write a routine that reads in csv data and appends it in an xml template and saves it. I am not allowed to use C# or C++. It must be in C. I am running it on a Sun machine. Our team has come up with the reader for the nodes of the xml. I've checked several websites looking for example code, but everything is in C# or Java. I realize those are more helpful when working with PHP, etc. Is there somewhere I can find a reader for C?
 
Technology news on Phys.org
  • #2
If you know the format of the CSV file the normal way is to just use fscanf() - or better getline() and sscanf().
 
  • #3


I understand the importance of using the appropriate programming language and tools for a specific task. In this case, you have mentioned that you need to create an XML reader in C for a Sun machine and that you are not allowed to use C# or C++. I commend your team for already coming up with a reader for the nodes of the XML, as this is a crucial component in the overall process.

To address your concern about finding example code for a C XML reader, I suggest looking into open-source libraries that provide support for XML parsing in C. Some examples include libxml2, expat, and TinyXML. These libraries offer a variety of functions and routines for reading and manipulating XML data in C, which can be very helpful for your task.

Additionally, it may be useful to consult online forums and communities dedicated to C programming, as fellow programmers may have encountered similar tasks and can offer guidance and advice. I also recommend exploring online tutorials and documentation for the specific library you choose to use, as they often provide detailed examples and explanations on how to use their functions.

I hope this helps in your search for a C XML reader and that you are able to successfully complete your routine for reading and appending CSV data into an XML template. Good luck with your project!
 

1. What is an XML reader?

An XML reader is a software component that reads and parses XML documents. It allows a computer program to access and manipulate the data within an XML document.

2. Why would I need to create an XML reader in C for Sun Machine?

If you are working with XML data on a Sun Machine, you may need to create an XML reader in C in order to efficiently read and process the data. This is especially useful for large XML files that may not be easily handled by other programs or languages.

3. What are the advantages of using C to create an XML reader for Sun Machine?

C is a powerful and efficient programming language, making it a good choice for creating an XML reader for Sun Machine. It also allows for low-level manipulation of data, which can be useful when working with complex XML structures.

4. Are there any specific considerations when creating an XML reader for Sun Machine?

Yes, there are a few things to keep in mind when creating an XML reader for Sun Machine. You will need to ensure that your code is compatible with the Sun Machine's operating system and that it can handle any specific requirements or limitations of the machine.

5. Are there any resources available to help me create an XML reader in C for Sun Machine?

Yes, there are many resources available online that can assist you in creating an XML reader in C for Sun Machine. You can find tutorials, code examples, and forums where you can ask for help and guidance from other developers.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
22
Views
954
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
Replies
6
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
25
Views
1K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
22
Views
868
Back
Top