Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4627262
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:32:34+00:00 2026-05-22T03:32:34+00:00

So I am trying to edit an xml (output is an xml) using SAX

  • 0

So I am trying to edit an xml (output is an xml) using SAX parsing in VB6 (for an ancient COM component). I would prefer to use DOM parsing but the size of the xml (over 20MB’s potentially) forces me to use SAX. I am relatively new to VB6 and I have no experience in SAX parsing. I have looked around online but even the best resource I have found (http://www.developerfusion.com/article/84405/sax-and-vb-6/) gives me little insight into how to combine grandchilren tags with existing attributes to make one longer attribute for a renamed tag.

I have the basic framework setup (as shown on the linked site). I think I might be able to limit most of the heavy lifting to two or three sub procedures (the first four lines in _startDocument, grab the description tag with _startElement, put the description into the function tag with endElement). However my lack of VB6/SAX knowledge is really hurting me here. Any help would be greatly appreciated.

Here is what the XML looks like Now;

<errordetails>
<error desc=”Count: 2”/>
<error desc=”System: System X”/>
<error desc=”Reason: Reason X”/>
   <functions>
      <function name=”x1” Description=”y1”>
         <violations count="2">
            <violation><source>admin</source><description>the first reason</description></violation>
            <violation><source>admin</source><description>the second reason</description></violation>
         </violations>  
      </function>
      <function name=”x2” Description=”y2”>
         <violations count="1">
           <violation><source>admin</source><description>another reason</description></violation>
        </violations>   
      </function>
   </functions>
</errordetails>

Here is what I want the xml to look like;

<errordetails>
<error desc=”Count: 2”/>
<error desc=”System: System X”/>
<error desc=”Reason: Reason X”/>
<error desc=”FunctionName: x1, FunctionDescription: y1, FunctionReason: the first reason, FunctionReason: the second reason”/>
<error desc=”FunctionName: x2, FunctionDescription: y2, FunctionReason: another reason"/>
</errordetails>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:32:35+00:00Added an answer on May 22, 2026 at 3:32 am

    Have you read things like the old article The Joy of SAX: a Visual Basic Sample?

    It is hard to tell you much more. SAX is pretty simple really, you just need to approach it much as you should any VB6 Form, as a state machine. This means most of the logic you’ll write will manage state, like accumulating and emitting transformed data as it is fed to you through the events.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: What I mean is displaying the XML data through HTML, not trying to
I'm trying to edit the output joomla main_menu module so I can make a
Hmm... i'm trying to use a php variable in jquery, in my edit.php :
I am trying to create hyperlinks using XML information and XSLT templates. Here is
I am trying to generate some XML on-the-fly in Scala. I want to use
Background: I am trying to edit a couple hundred of xml files- I need
I am experiencing weird behaviour when trying to format xml output while modifying domdocument
I'm trying to edit a textbox's text in a Page_Load form on an ASP.NET
I am trying to edit a record. I have the default route. When I
I have a relatively big SSIS package which I'm trying to edit. I basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.