In the following example, I am parsing the XML file and trying to get the prefix of the node <my:person>David</my:person>.
The call to DOM_Node::getPrefix() always returns NULL, while I understand that it should return "my". However, the call to DOM_Node::getNamespaceURI() does return the correct value "http://david.com/david-schema". Some guidance on how to get the prefix would be appreciated. Best regards, David Ruana --------------- File david3.xsd <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://david.com/david-schema" targetNamespace="http://david.com/david-schema"> <xs:element name="addressbook"> <xs:complexType> <xs:sequence> <xs:element ref="my:person" minOccurs='1' maxOccurs='unbounded'/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="person" type="xs:string"/> </xs:schema> --------------- File david3.xml <?xml version="1.0" encoding="UTF-8"?> <my:addressbook xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://david.com/david-schema" xsi:schemaLocation="http://david.com/david-schema david3.xsd"> <my:person>David</my:person> </my:addressbook> _________________________________________________________________ Descargue GRATUITAMENTE MSN Explorer en http://explorer.yupimsn.com/intl.asp. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
