Replies: 2 comments
-
Ok, so I figured that you need to use namespaces for that, however, it seems to have an issue not letting name 2 of the same. For example:
and my xml will endup with either http://www.w3.org/2005/Atom or http://www.itunes.com/dtds/podcast-1.0.dtd, latter will overwrite it. and to get colon work i need to write something like this: xmlns:atom:link and xmlns:itunes:image Example output (i have some extra stuff added):
it adds: xmlns:atom="http://www.itunes.com/dtds/podcast-1.0.dtd" and xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" which are not needed and wrong as I can set 1 per xmlns by defining namespaces. Hope that makes sense. Other than that the library is almost perfect. |
Beta Was this translation helpful? Give feedback.
-
About the first comment, as you guessed it is not possible in xml to use semi colon in tag name because it is reserved for the namespace part. About the second comment, please check out the wiki here
It solves exactly what you need, just follow the documentation example. In the next release there will be a constructor option that will allow to register namespaces with the constructor, helping in situations like your. For now, just use the code explained above and stay tuned. |
Beta Was this translation helpful? Give feedback.
-
I cannot uderstand how to add colons : in the tags. It works fine in attributes. See code example below. Am I missing something? Part that doesn't work: add('atom:link', '...')
error i am getting: Fatal error: Call to a member function uri() on null
Beta Was this translation helpful? Give feedback.
All reactions