• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: nodesForXPath almost always returns no objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nodesForXPath almost always returns no objects


  • Subject: Re: nodesForXPath almost always returns no objects
  • From: Ryan Homer <email@hidden>
  • Date: Tue, 9 Jan 2007 10:03:22 -0500

I found this information: http://www.w3schools.com/xml/ xml_namespaces.asp

The XML Namespace (xmlns) Attribute

The XML namespace attribute is placed in the start tag of an element and has the following syntax:

xmlns:namespace-prefix="namespaceURI"
When a namespace is defined in the start tag of an element, all child elements with the same prefix are associated with the same namespace.


Note that the address used to identify the namespace is not used by the parser to look up information. The only purpose is to give the namespace a unique name. However, very often companies use the namespace as a pointer to a real Web page containing information about the namespace.
Try to go to http://www.w3.org/TR/html4/.


----

So, this is only used to give a unique name and some people/companies use the namespace to give further information, but it seems that it is not a requirement. However, the syntax is somewhat different. They are using the following format:

<h:table xmlns:h="http://www.w3.org/TR/html4/";>
   <h:tr>
   <h:td>Apples</h:td>
   <h:td>Bananas</h:td>
   </h:tr>
</h:table

So, they are defining a namespace called "h". In my example, it is:

<FindMembershipResponse xmlns="http://www.msn.com/webservices/ AddressBook">

Does anyone know the difference? If we're not defining a new namespace, why the xmlns tag?

Ryan

On 9-Jan-07, at 12:12 AM, Stephen Deken wrote:

<FindMembershipResponse xmlns="http://www.msn.com/webservices/ AddressBook">
</FindMembershipResponse>
Am I getting the syntax wrong? Any ideas? Thanks in advance.

While I don't profess to know how to solve it, the problem appears to be the 'xmlns' attribute on this element. Without it, the query works as expected.


I'd be interested to learn how to solve this one myself. Is it only because the mentioned URI is a 404?

Stephen Deken
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: nodesForXPath almost always returns no objects
      • From: Klaus Backert <email@hidden>
References: 
 >nodesForXPath almost always returns no objects (From: Ryan Homer <email@hidden>)
 >Re: nodesForXPath almost always returns no objects (From: Stephen Deken <email@hidden>)

  • Prev by Date: Re: OCR-B
  • Next by Date: [Moderator] EOT (Re: OCR-B)
  • Previous by thread: Re: nodesForXPath almost always returns no objects
  • Next by thread: Re: nodesForXPath almost always returns no objects
  • Index(es):
    • Date
    • Thread