You are here: Re: Remove data outside a pair of xml tags. « PHP Programming Language « IT news, forums, messages
Re: Remove data outside a pair of xml tags.

Posted by lazypig06@gmail.com on 06/21/06 22:40

Thank you all for your responses !

It turned out my xml file contains junks within its xml tags such as
below.

----------------------------------------------
1ffc
<firsttag>
<secondtag>some data</secondtag>
<third
1ffc
tag>Data for third tag</thirdtag>
</firsttag>
0
--------------------------------------------------
I did some research on the web and it turned out the junks that I have
in the xml file are Greek's characters (The junks are "1ffc", "fa1",
and some numbers including number 0 at the end of xml file. These junks
prevent the xml to be parsed correctly.

Does anybody have any idea to to get rid of these junk/ convert these
characters to empty string/characters ?

Thanks for your help,

Lazy Pig





lazypig06@gmail.com wrote:
> Hi !
>
> I am a PHP beginner.
> I hope somebody can help me with this problem that I've been having.
> I've been trying to clean up junk data that I have at the begining and
> ending of an xml file. Let's say I have an xml file with some junk data
> like below
>
> --------------------------------------------------------------
> Junk dataflasjfasj
> <firsttag>
> <secondtag>data</secondtag>
> <thirdtag>whatever</thirdtag>
> </firsttag>
>
> junk dataga.
> ---------------------------------------------------------------
>
> Does someone know how to remove the junk in the file and just return
> the actual xml stuff( including the <firsttag> tag ?
>
> I tried to use strpos and substr but somehow the tag in the string is
> not being returned.
>
> Any help would be appreciated !
>
> Thanks,
> Lazy Pig

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация