DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2005
    Posts
    3

    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">
    </Star>
    </Airport>
    </ProceduresDB>

    Output is:

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

    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
    Cheers
    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

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links