Solved

Help creating and reading xml tags

Posted on 2011-02-24
7
300 Views
Last Modified: 2012-08-13
Hello experts, this is loaded question.  I have created xml files and read from them in the past, but the new xml's i am creating plus reading from are becoming more complicated.  They are larger using attributes with larger tree structures.  My first question is why would i need to serialize an xml file?  My second is can someone make sense of this code below?  I found some code that looks like it is creating a shippingnote element but I am not sure what the extra attributes above the code are doing.  If i can add properties to create xml elements that would help a lot.  Basically i need a good tutorial on creating and reading xmls for visual studio 2008.

<XmlIgnore> _   'what does this do?
'*********************** ShippingNote element ***********************
		<XmlElement(ElementName:="ShippingNote",IsNullable:=false,Form:=XmlSchemaForm.Qualified,DataType:="string"), _
		EditorBrowsable(EditorBrowsableState.Advanced)> _
		Public __ShippingNote As String
		
		<XmlIgnore> _
		Public Property ShippingNote As String
			Get
				ShippingNote = __ShippingNote
			End Get
			Set(Value As String)
				__ShippingNote = Value
			End Set
		End Property

Open in new window

0
Comment
Question by:tentavarious
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 11

Expert Comment

by:srikanthreddyn143
ID: 34970761
Xml Ignore doesn't include shipping note as a tag when you you deserialize the class into xml.
0
 
LVL 11

Expert Comment

by:srikanthreddyn143
ID: 34970818
Read deserialize as serialize.

0
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 200 total points
ID: 34970842
See the uses in this link but the examples are in C#

http://www.dotnetjohn.com/articles.aspx?articleid=173
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:tentavarious
ID: 34970844
Ok, still confused why do i need to serialize or deserialize xmls?  
0
 
LVL 11

Expert Comment

by:srikanthreddyn143
ID: 34970952
One basic use is XML can be used across multiple platforms. Above link has other uses of XML serialization.
0
 
LVL 5

Expert Comment

by:MikkelAStrojek
ID: 34982600
The XmlIgnore tells the XmlSerializer to ignore the property when de/serializing.
XmlSerializer can be used turning object graphs to and from xml.

I your case the ShippingNote property/variable on the class in mind, will not be serialized. That is it won't be in the xml.

0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 150 total points
ID: 34988331
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question