Why are the xml tags not visible?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Why are the xml tags not visible?
# 1  
Old 04-05-2007
Why are the xml tags not visible?

Could some one please tell me why, when I run the following
php code:
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<?php  
$readfile = file("rss_file.xml");

for ($k=0; $k<=count($readfile)-1; $k++) {
	    echo "$readfile[$k]<br>";
}

</BODY>
</HTML>

the tags do not appear in output to my firefox browser?
# 2  
Old 04-06-2007
Quote:
Originally Posted by photon
Could some one please tell me why, when I run the following
php code:
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<?php  
$readfile = file("rss_file.xml");

for ($k=0; $k<=count($readfile)-1; $k++) {
	    echo "$readfile[$k]<br>";
}
?>
</BODY>
</HTML>

the tags do not appear in output to my firefox browser?
The HTML tags do not appear because parsing stops due to the missing closing php tag. You probably do not have errors displayed by default so you do not see the error. Running on my system on the command line gives exactly the error.

Quote:
X-Powered-By: PHP/5.1.4
Content-type: text/html

<br />
<b>Parse error</b>: syntax error, unexpected '<' in <b>/home/cbkihong/-</b> on line <b>13</b><br />
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to pull multiple XML tags from the same XML file in Shell.?

I'm searching for the names of a TV show in the XML file I've attached at the end of this post. What I'm trying to do now is pull out/list the data from each of the <SeriesName> tags throughout the document. Currently, I'm only able to get data the first instance of that XML field using the... (9 Replies)
Discussion started by: hungryd
9 Replies

2. Solaris

Groups is not visible

OS : SunOS 5.8 I am trying to add a user ad3059 to the following groups, A B C D ( four groups A,B,C,D) When i use usermod command and add the user to the above groups, and go to > groups ad3059 other C D It doesnt show A and B groups and shows it as other.Please advice on how... (13 Replies)
Discussion started by: Revathi2089
13 Replies

3. Shell Programming and Scripting

How to add Xml tags to an existing xml using shell or awk?

Hi , I have a below xml: <ns:Body> <ns:result> <Date Month="June" Day="Monday:/> </ns:result> </ns:Body> i have a lookup abc.txtt text file with below details Month June July August Day Monday Tuesday Wednesday I need a output xml with below tags <ns:Body> <ns:result>... (2 Replies)
Discussion started by: Nevergivup
2 Replies

4. Shell Programming and Scripting

Compare two xml files while ignoring some xml tags

I've got two different files and want to compare them. File 1 : <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record id="38,557"><columns><column><name>orge... (2 Replies)
Discussion started by: Shaishav Shah
2 Replies

5. Shell Programming and Scripting

Shell Command to compare two xml lines while ignoring xml tags

I've got two different files and want to compare them. File 1 : HTML Code: <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Discussion started by: Shaishav Shah
1 Replies

6. Shell Programming and Scripting

How to add the multiple lines of xml tags before a particular xml tag in a file

Hi All, I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me. <A>testing_Location</A> <value>LA</value> <zone>US</zone> <B>Region</B> <value>Russia</value> <zone>Washington</zone> <C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies

7. Shell Programming and Scripting

How to get values from xml tags?

Hi guys, Need ur help again. Source File is coming like this. sample two records are below: <?xml version="1.0"?> <Object> <Header> <XCOMVers>V1.0</XCOMVers> <REPORT>XXXXX</REPORT> <CODE>002</CODE> </Header> <IssueCard> <Record> <L>CAR SYSTEM -SSSSS ... (3 Replies)
Discussion started by: sene_geet
3 Replies

8. Shell Programming and Scripting

Data between XML Tags

<?xml version="1.0" encoding="iso-8859-1" ?> <TABLE> <TEST> <ID> 123 </ID> <name> abc </name> </TEST> <TEST> <ID> 123 </ID> <name> abc2 </name> </TEST> </TABLE> <TABLE> <TEST> <ID> 456 </ID> <name> def </name> </TEST> <TEST> ... (8 Replies)
Discussion started by: eskay
8 Replies

9. Solaris

folder not visible in ls -l

Hi, I have a strange problem. when i do ls i see a folder, say 'abc', but it disappears when i do ls -l. I cannot access or mv that folder. Solaris 10 (SPARC) doesn't allow me to create a new folder with the same name, as it already exists. 'file' command also doesn't recognize i 'abc'... (10 Replies)
Discussion started by: Mack1982
10 Replies

10. Web Development

images are not visible

hi, why my uploaded images are not visible both in front-end and back-end of my CMS ? See the picture: http://dl-client.getdropbox.com/u/72686/noPics.png I checked the GD library in php. It seems ok... http://dl.getdropbox.com/u/72686/GD.png thanks ---------- Post updated at... (0 Replies)
Discussion started by: aneuryzma
0 Replies
Login or Register to Ask a Question