473,394 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Part2 csv to xml

hey all,

<document>
<RecordLine>
<CoordX>3</CoordX >
<CoordY>1</CoordY >
<DataType>B</DataType >
</RecordLine>
</document>
in vb i can easily say string.split(",") and control the string from there
but i do begin to do that with xml? any good beginner .net articles on how to
do this? any words of encouragement?

thanks,
rodchar
Jun 27 '08 #1
2 917
On Jun 12, 3:12 pm, rodchar <rodc...@discussions.microsoft.comwrote:
hey all,

<document>
<RecordLine>
<CoordX>3</CoordX >
<CoordY>1</CoordY >
<DataType>B</DataType >
</RecordLine>
</document>

in vb i can easily say string.split(",") and control the string from there
but i do begin to do that with xml? any good beginner .net articles on how to
do this? any words of encouragement?

thanks,
rodchar
Normally with xml you will use XPath or and XmlReader to navigate the
nodes of the xml. It's not clear from this post or your other post
what you are trying to accomplish. Are you trying to create xml from
some other source?

One way would be to create a class called Document that includes
properties for the data you have described above and use the Xml
Serializer to create the xml for you. But you'll need to provide more
information.

Chris
Jun 27 '08 #2
Clearly you should use whatever format is optimal for you to solve the
required problem. XML works great for serializing objects within an
application or for interoperability between applications.

You seem to be comparing to CSV, so I will say that CSV works great
sometimes. When you run into data that the strings contain commas and
quotes, the trivial string.split(",") logic fails. Also you need to remember
to trim in case extra spaces are present.

My personal gripe on CSV reading is where the matrix is irregular, meaning
that it is not a matrix of Rows X Columns data, but rather a set of Rows
arrays of varying sizes, such as:

Honda, Pilot, Accord, Civic, Odessey
Toyota, Prius, Highlander, Camrey
Ford, Pinto

Just my 2 yen...
"rodchar" wrote:
hey all,

<document>
<RecordLine>
<CoordX>3</CoordX >
<CoordY>1</CoordY >
<DataType>B</DataType >
</RecordLine>
</document>
in vb i can easily say string.split(",") and control the string from there
but i do begin to do that with xml? any good beginner .net articles on how to
do this? any words of encouragement?

thanks,
rodchar
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rob | last post by:
Hi I am getting the error *** glibc detected *** free(): invalid pointer: 0x083e20cc *** Aborted When I run the code <?php
1
by: Mark Dicken | last post by:
Hi All I have found the following Microsoft Technet 'Q' Article :- Q210368 -ACC2000: How to Pass an Array as an Argument to a Procedure (I've also copied and pasted the whole contents into...
1
by: carverk | last post by:
Hello, Thanks for the Info. Darryl, but have decided to go a different way about this. Here is the following update to the prob: 1. A table called "T_Photos", contains the names of the devices...
2
by: Jason | last post by:
This is a simplified demo of the problem I posted this morning... boiled down to just the basic case that is causing my app to run painfully slow. Seems like the slow part is using the graphicsPath...
1
by: skootr | last post by:
In a very simple learning project, I have a form and a UserControl in the same project. The first time I place the UserControl on the form, it is fine, however, if I make changes to the UserControl,...
9
by: zacks | last post by:
I have written a serialized class that has several properties that are typed as a list of type class. When I deserialize an XML file, the list is populated just fine. But I am having trouble...
2
by: TB | last post by:
Hi All: A very simple question, which I hope has a simple answer: On page.aspx I have two user controls: part1.ascx and part2.ascx How can I trigger the reloading of part2.ascx from within...
5
by: Stephen3776 | last post by:
I am doing an inventory control progam and trying to output a multiple array, I am getting an illegal conversion error java.lang.double !d. Can somebody tell me what I am doing wrong or if there is...
16
by: lilsugaman | last post by:
I have to assignment which includes the following: Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.