Solved

Help creating and reading xml tags

Posted on 2011-02-24
7
288 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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 74

Assisted Solution

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

13 Experts available now in Live!

Get 1:1 Help Now