Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 14th, 2004, 05:16 PM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default .NET and XML Namespaces - NamespaceManager

Hi,

I was wondering if there is a way to populate the NameSpaceManager with multiple [prefix, URI] sets instead of doing NameSpaceManager.AddNameSpace for each set.

That is, say I have a string

XMLNS = "abc='www.abc.com' nop='www.nop.com' xyz='www.xyz.com'"

I want to do something like:

xmlnsManager = new NameSpaceManager(XMLNS);

instead of:

xmlnsManager.AddNamespace("abc", "www.abc.com")
xmlnsManager.AddNamespace("nop", "www.nop.com")
xmlnsManager.AddNamespace("xyz", "xyz.abc.com")

Is this possible?

Thanks,

Bobby

Reply With Quote
  #2 (permalink)  
Old December 15th, 2004, 08:51 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Not that I know of, it's not difficult to roll your own, split the string on the spaces and then split each item on the equals sign. You can then remove the single quotes in the URI.


--

Joe (Microsoft MVP - XML)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cant reach data in xml with namespaces TPP XSLT 3 March 25th, 2006 04:40 PM
cant reach data in xml with namespaces TPP XSLT 1 March 24th, 2006 11:47 AM
Confused about XML namespaces planoie XSLT 2 June 2nd, 2005 05:23 AM
XML Namespaces billy_bob_the_3rd XML 1 January 31st, 2005 03:41 PM
Accessing XML Node with multiple namespaces bamirzada C# 0 August 14th, 2003 08:41 PM



All times are GMT -4. The time now is 09:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.