Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Including external XML files for cleaner config?

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
eger



Joined: 04 Mar 2010
Posts: 5

PostPosted: Tue Mar 30, 2010 5:55 pm    Post subject: Including external XML files for cleaner config? Reply with quote

I found an old forum post (http://icecast.imux.net/viewtopic.php?t=324) which asked a question about including external XML files for cleaner configs with lots of mounts.

I tried doing the following per XML standards:

Added to top of icecast.xml:
<!DOCTYPE icecast

<!ENTITY dance SYSTEM "/etc/icecast/dance.xml">
]>

Then inside the <icecast> near bottom added:
&dance;

I then reloaded icecast using -HUP. But the changes do not get picked up. It does work if I include the dance.xml contents in the icecast.xml itself.

I am wondering if this is supported and if anyone has successfully implemented include files in their setup? If so, do you have an example?

Thanks!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Mar 30, 2010 8:36 pm    Post subject: Reply with quote

not sure if anyone has tried it. It could be related to the api used, instead of (in cfgfile.c)

doc = xmlParseFile(filename);

try

doc = xmlReadFile (filename, NULL, 0);

The third arg is a bitwise or | of the options in http://xmlsoft.org/html/libxml-parser.html#xmlParserOption

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
eger



Joined: 04 Mar 2010
Posts: 5

PostPosted: Wed Apr 07, 2010 8:08 pm    Post subject: Reply with quote

karlH wrote:
not sure if anyone has tried it. It could be related to the api used, instead of (in cfgfile.c)

doc = xmlParseFile(filename);

try

doc = xmlReadFile (filename, NULL, 0);

The third arg is a bitwise or | of the options in http://xmlsoft.org/html/libxml-parser.html#xmlParserOption

karl.


Do you mean to use this right in the XML config as:

doc = xmlReadFile (/etc/myicecastextra.xml, NULL, 0);

and reference as &doc; ?

Just confirming as adding code to the XML file sounds a little strange to me!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Apr 07, 2010 8:14 pm    Post subject: Reply with quote

yes it would be weird which is why I said cfgfile.c which is in the src directory.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Yahav



Joined: 19 Apr 2010
Posts: 2

PostPosted: Mon Apr 19, 2010 9:57 pm    Post subject: Reply with quote

hey mate, its not a problem with the XML parser,
its your syntax!
Very Happy

Here's Your Code:
Code:
<!DOCTYPE icecast

<!ENTITY dance SYSTEM "/etc/icecast/dance.xml">
]>


and here's the correct one:
Code:

<!DOCTYPE icecast [

<!ENTITY dance SYSTEM "/etc/icecast/dance.xml">
]>



good luck mate.

yahav
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber