Solved

Help creating and reading xml tags

Posted on 2011-02-24
7
292 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
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help on C# Linq query on object 6 53
Class object 2 26
Data is not showing from images 15 37
Visual Studio 2015 Source Code Control 10 34
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now