×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Help with XML with namespace

Help with XML with namespace

Help with XML with namespace

(OP)
Hi:

I have a request it's a XML with the namespace and the schema like this:

-<eu:AddendaEU xsi:schemaLocation="http://factura.envasesuniversales.com/addenda/eu http://factura.envasesuniversales.com/addenda/eu/E..." xmlns:eu="http://factura.envasesuniversales.com/addenda/eu">

However I create this

-<eu:AddendaEUndaEU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:eu="http://factura.envasesuniversales.com/addenda/eu" xsi:schemaLocation="http://factura.envasesuniversales.com/addenda/eu http://factura.envasesuniversales.com/addenda/eu/E...">

The XML that I have created it has a extra node. So they tell me that's wrong. If I remove this extra node I have an error. So I want to know what can I do?

This is my code:

Set objDom = CreateObject("Msxml2.DOMDocument.3.0")

ns = "http://factura.envasesuniversales.com/addenda/eu"
xsi = "http://factura.envasesuniversales.com/addenda/eu http://factura.envasesuniversales.com/addenda/eu/E..."

Set objRoot = objDom.createNode(1, "eu:AddendaEU", ns)
objRoot.setAttribute "xsi:schemaLocation","http://factura.envasesuniversales.com/addenda/eu http://factura.envasesuniversales.com/addenda/eu/E..."
objRoot.setAttribute "xmlns:eu","http://factura.envasesuniversales.com/addenda/eu"
objRoot.setAttribute "xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"

Can anybody help me?

RE: Help with XML with namespace

Check your Msxml2.DOMDocument.3.0 with the MSXML you have installed. Is it version 3? If it is version 6, it should be 6.0

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close