SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Using XML in a DataSet
      (ADO.NET)



              Ringo Ray H Piedraverde
                  (Jr. Programmer)
Topics
• Writing DataSet Contents as XML Data
  (ADO.NET)

• Loading a DataSet from XML (ADO.NET)
Writing DataSet Contents as XML
          Data (ADO.NET)
• WriteScheme Method
  – Writes the current contents of the DataSet as XML
    data with the relational structure as inline XML
    Schema.
• WriteXml method
  – Using this method you can write the Dataset to a
    file, stream, or XmlWriter.
Code Snippet



Dim mds As DataSet = mds.tables(“tblUser”)

mUserDS.WriteXml(“User.xml", XmlWriteMode.WriteSchema)
Xml output
Loading a DataSet from XML
               (ADO.NET)
• To fill a DataSet with data from XML, use the ReadXml
  method of the DataSet object. The ReadXml method
  reads from a file, a stream, or an XmlReader, and takes
  as arguments the source of the XML.

• The ReadXml method reads the contents of the XML
  stream or document and loads the DataSet with data. It
  will also create the relational schema of the DataSet
  depending on the XmlReadMode specified and whether
  or not a relational schema already exists.
Code snippet
Dim m_Ds as Dataset

Public sub ReadXML()

m_User.ReadXml(“User.xml", XmlReadMode.ReadSchema)

End Sub
Reading Output
• End

Weitere ähnliche Inhalte

Was ist angesagt?

ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...Stuart Chalk
 
Quick overview on mongo db
Quick overview on mongo dbQuick overview on mongo db
Quick overview on mongo dbEman Mohamed
 
Single page application 05
Single page application   05Single page application   05
Single page application 05Ismaeel Enjreny
 
FleSSR Business Models
FleSSR Business ModelsFleSSR Business Models
FleSSR Business ModelsEduserv
 
MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011Chris Westin
 
W3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed ArraysW3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed ArraysChanghwan Yi
 
Replicating application data into materialized views
Replicating application data into materialized viewsReplicating application data into materialized views
Replicating application data into materialized viewsZach Cox
 
Data structure
Data structureData structure
Data structureNida Ahmed
 
Get docs from sp doc library
Get docs from sp doc libraryGet docs from sp doc library
Get docs from sp doc librarySudip Sengupta
 

Was ist angesagt? (20)

Matlab Organizing Data
Matlab Organizing DataMatlab Organizing Data
Matlab Organizing Data
 
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
 
Quick overview on mongo db
Quick overview on mongo dbQuick overview on mongo db
Quick overview on mongo db
 
Single page application 05
Single page application   05Single page application   05
Single page application 05
 
Singly Linked List
Singly Linked ListSingly Linked List
Singly Linked List
 
Head first latex
Head first latexHead first latex
Head first latex
 
Linked list
Linked listLinked list
Linked list
 
Ds chapter 2
Ds chapter 2Ds chapter 2
Ds chapter 2
 
FleSSR Business Models
FleSSR Business ModelsFleSSR Business Models
FleSSR Business Models
 
MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011MongoDB Aggregation MongoSF May 2011
MongoDB Aggregation MongoSF May 2011
 
W3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed ArraysW3C HTML5 KIG-Typed Arrays
W3C HTML5 KIG-Typed Arrays
 
Mongo db nosql (1)
Mongo db nosql (1)Mongo db nosql (1)
Mongo db nosql (1)
 
MongoDB
MongoDBMongoDB
MongoDB
 
Replicating application data into materialized views
Replicating application data into materialized viewsReplicating application data into materialized views
Replicating application data into materialized views
 
Data structure
Data structureData structure
Data structure
 
NOSQL Databases
NOSQL DatabasesNOSQL Databases
NOSQL Databases
 
Apache Spark - Aram Mkrtchyan
Apache Spark - Aram MkrtchyanApache Spark - Aram Mkrtchyan
Apache Spark - Aram Mkrtchyan
 
An HDF-EOS DataBlade using Informix's Object-Relational Database
An HDF-EOS DataBlade using Informix's Object-Relational DatabaseAn HDF-EOS DataBlade using Informix's Object-Relational Database
An HDF-EOS DataBlade using Informix's Object-Relational Database
 
Get docs from sp doc library
Get docs from sp doc libraryGet docs from sp doc library
Get docs from sp doc library
 
Data Binding in Grails
Data Binding in GrailsData Binding in Grails
Data Binding in Grails
 

Ähnlich wie Using xml in a data set (ado.net) (20)

Xml writers
Xml writersXml writers
Xml writers
 
Ado.net xml data serialization
Ado.net xml data serializationAdo.net xml data serialization
Ado.net xml data serialization
 
Ado.net session14
Ado.net session14Ado.net session14
Ado.net session14
 
2310 b 12
2310 b 122310 b 12
2310 b 12
 
Advanced Web Programming Chapter 12
Advanced Web Programming Chapter 12Advanced Web Programming Chapter 12
Advanced Web Programming Chapter 12
 
Simple xml in .net
Simple xml in .netSimple xml in .net
Simple xml in .net
 
Xml parsing
Xml parsingXml parsing
Xml parsing
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
XMl
XMlXMl
XMl
 
XML
XMLXML
XML
 
Ajax xml json
Ajax xml jsonAjax xml json
Ajax xml json
 
Ch23
Ch23Ch23
Ch23
 
Ch23 xml processing_with_java
Ch23 xml processing_with_javaCh23 xml processing_with_java
Ch23 xml processing_with_java
 
ASP.Net Presentation Part2
ASP.Net Presentation Part2ASP.Net Presentation Part2
ASP.Net Presentation Part2
 
Xml processing in scala
Xml processing in scalaXml processing in scala
Xml processing in scala
 
Xml processing in scala
Xml processing in scalaXml processing in scala
Xml processing in scala
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
Python xml processing
Python   xml processingPython   xml processing
Python xml processing
 
XML Schema.pptx
XML Schema.pptxXML Schema.pptx
XML Schema.pptx
 

Mehr von Alfred Jett Grandeza

Automated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAutomated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAlfred Jett Grandeza
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesAlfred Jett Grandeza
 
Career Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduatesCareer Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduatesAlfred Jett Grandeza
 
Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011Alfred Jett Grandeza
 

Mehr von Alfred Jett Grandeza (7)

Automated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAutomated testing using Selenium & NUnit
Automated testing using Selenium & NUnit
 
What’s new in VS 2017?
What’s new in VS 2017?What’s new in VS 2017?
What’s new in VS 2017?
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry Practices
 
What's new in Angular 2?
What's new in Angular 2?What's new in Angular 2?
What's new in Angular 2?
 
Career Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduatesCareer Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduates
 
Software development fundamentals
Software development fundamentalsSoftware development fundamentals
Software development fundamentals
 
Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011
 

Kürzlich hochgeladen

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Using xml in a data set (ado.net)

  • 1. Using XML in a DataSet (ADO.NET) Ringo Ray H Piedraverde (Jr. Programmer)
  • 2. Topics • Writing DataSet Contents as XML Data (ADO.NET) • Loading a DataSet from XML (ADO.NET)
  • 3. Writing DataSet Contents as XML Data (ADO.NET) • WriteScheme Method – Writes the current contents of the DataSet as XML data with the relational structure as inline XML Schema. • WriteXml method – Using this method you can write the Dataset to a file, stream, or XmlWriter.
  • 4. Code Snippet Dim mds As DataSet = mds.tables(“tblUser”) mUserDS.WriteXml(“User.xml", XmlWriteMode.WriteSchema)
  • 6. Loading a DataSet from XML (ADO.NET) • To fill a DataSet with data from XML, use the ReadXml method of the DataSet object. The ReadXml method reads from a file, a stream, or an XmlReader, and takes as arguments the source of the XML. • The ReadXml method reads the contents of the XML stream or document and loads the DataSet with data. It will also create the relational schema of the DataSet depending on the XmlReadMode specified and whether or not a relational schema already exists.
  • 7. Code snippet Dim m_Ds as Dataset Public sub ReadXML() m_User.ReadXml(“User.xml", XmlReadMode.ReadSchema) End Sub