How to post xml in a FAQ

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

How to post xml in a FAQ

Post by ardiederich »

I need to post XML in my FAQs quite frequently. The xml gets input OK into the system, but then when I go to edit the FAQ the XML disappears. I can see it when I show source on the HTML on the page. The XML does appear when I view the FAQ through the user side.

Here's an example XML bit I've used:

<message to='jabber.example.com/announce/online'>
<body>Text of message here.</body>
</message>

Do I just need to escape all the < and > ?

--
Andrew Diederich
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

Oh, I'm using 1.4.0a. I also see the xml eaten up (blanked) when I make a pdf, but not when I look at the printer friendly version.
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

BUG: can't post xml in faq

Post by ardiederich »

I tried making a faq with only the text "<root/>" in 1.4.2. It all gets deleted / eaten up. Is there a way to use xml in a faq? The FAQ I'm putting up has an xml based config file, so this is why I'd like to do this.

One workaround I've found is to add a lot of spaces, like "< root/ >". This lets it display, but it makes cutting and pasting difficult.

Thanks for the help.

--
Andrew
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you're right, there's a bug. I'll fix it in the next version.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this bug is fixed in phpMyFAQ 1.4.3 RC2. Quite strange bug. :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

Lots of stuff going in 1.4.3 RC2! Looking forward to it.

Andrew
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

yes, I fixed a lot of bug in this release.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

One area left for this. When you view a pdf version, the tags disappear. Here's the test text I used:

This has xml.
<xml>
<xml/>
<start>asdfasdf</start>

When I view the active faq, or a preview, it comes out just fine. However, when I "Show this as pdf file" I get:

This has xml.


asdfasdf

Thanks again for the help. Sorry I didn't get to test this in the RC.
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay... I'll look at this issue. I'll fix it with 1.4.4 RC1 and in 1.5.0-CVS.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this issue is now fixed and the bugfix will be released the next days in phpMyFAQ 1.4.4 RC1.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

This isn't working as well for me as I first thought. Here's the test text I used:
foo

<xml/>

foobar

<first>second</first>

bar

*********
So, if I just put in the text, then mark it active and save it, it displays ok on the user side. However, when I edit it (firefox 1.0), I just see:
foo

foobar

second

bar

********

Thanks for your continued work on all of this.

Andrew
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

Here's my system info:

phpMyFAQ Version
phpMyFAQ 1.4.3
Server Software
Apache/2.0.40 (Red Hat Linux)
PHP Version
PHP 4.2.2
PHP Memory Limit
8M
Register Globals
off
Safe Mode
off
MySQL Client Version
MySQL 3.23.58
MySQL Server Version
MySQL 3.23.58
Webserver Interface
APACHE2FILTER
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

yes, I know that. There is still a bug in 1.4.3 which is fixed in 1.4.4 RC1. Sorry for that!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

tested in 1.4.4 rc1

Post by ardiederich »

Ok, I installed in 1.4.4 rc1, and the xml now displays. One odd thing that does happen, though, is the spaces on the left of tags disappear. i.e. if you pretty-print your xml, then the spaces aligning things on the left all go away.

Here's some test xml I've been using:
<logging xmlns='jabber:config:logging'>
<logger xmlns='jlog:logger:filtered'>
<filter xmlns='jlog:filter:level:pipe' level='ERROR'
pipe='/opt/jabber/log/jds_syslog.pipe'/>
<logger xmlns='jlog:logger:syslog'>
<identity>jabber_jds</identity>
<facility>LOG_DAEMON</facility>
</logger>
</logger>
<logger xmlns='jlog:logger:filtered'>
<filter xmlns='jlog:filter:level:pipe' level='INFO'
pipe='/opt/jabber/log/jds_file.pipe'/>
<logger xmlns='jlog:logger:stream' stream='stdout'/>
</logger>
</logging>

Thanks again for the help.

--
Andrew Diederich
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I will test this issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply