read write xml alternatives?

Posted on 2005-05-17
Last Modified: 2012-05-05

at the moment i am putting togetther an app which uses xml as a data repositry

anytime i need to write to a file at the moment i have to

read in the source xml to a ds
modify the ds
archive/delete the source
write a new source file

getting a 1000 line item xml file in memory then having to rewrite the whole xml file seems like a bit of an overhead are there any better (possibly by streaming the file) methods than

dim ds as new dataset
dim strfilename as string = "C:\file.xml"
dim dr as new datarow

for each dr in ds.tables(0).rows
if dr("Update_flag")  = "A" then
dr("Update_Flag") = "N"

'function archives source xml to a different laction with a datestamp




Question by:markofsoton
    1 Comment
    LVL 44

    Accepted Solution

    can't you use the XML DomDocument object, then selectSingleNode to read a specific node into a Node object, and update the Text property of the Node object?

    If you need to add a new node, you can create a node off the DOMDocument object, and then use appendChild to add the new node at the appropriate place in the Node structure.  We are doing precisly this (though use VBA in Excel), and it works like a charm.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    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…

    760 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

    14 Experts available now in Live!

    Get 1:1 Help Now