DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2005

    VB6 DOM Reading XML File

    In the following VB6 DOM code I am having trouble with output of the xml of the first child of the root

    Dim procDBDoc As New DOMDocument

    Private Sub Form_Load()

    procDBDoc.async = False
    procDBDoc.Load "F:\XML Test DOM Nodes\proceduresdb.xml"

    MsgBox procDBDoc.documentElement.firstChild.xml

    End Sub

    The file "F:\XML Test DOM Nodes\proceduresdb.xml" comprises:

    <?xml version="1.0" encoding="ASCII" standalone="yes"?>
    <ProceduresDB build="21/01/2002" version="1.0" xsi:schemaLocation="http://tempuri.org/XMLSchema.xsd D:\FSWork\FMC.xsd" xmlns="http://tempuri.org/XMLSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Airport ICAOcode="CYHZ">
    <Star Name="RWY06">

    Output is:

    <Airport xmlns="http://tempuri.org/XMLSchema.xsd" ICAOcode="CYHZ">
    <Star Name="RWY06">

    Why is the xmlns.................... section (I underlined it for this post) included in the output? How can I not have this when referrring to the firstChild?
    Any help is appreciated
    Ian M
    Last edited by ianm; 11-10-2005 at 08:03 AM.

Similar Threads

  1. problem in opening XML with EXCEL via VB6
    By eranfox in forum VB Classic
    Replies: 5
    Last Post: 08-09-2007, 07:18 AM
  2. VB6 Xpath accessing XML File
    By ianm in forum XML
    Replies: 2
    Last Post: 10-22-2005, 06:59 PM
  3. ASP.NET problem with XML file
    By rgcr in forum ASP.NET
    Replies: 14
    Last Post: 10-20-2005, 07:11 PM
  4. Replies: 2
    Last Post: 03-27-2001, 03:34 PM
  5. Replies: 0
    Last Post: 03-26-2001, 08:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.