OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XML Problem

[ Lists Home | Date Index | Thread Index ]

[Sebastian A]

> I am having some problems parsing XML with PHP. Here is an example of my
> problem:
> Example 1:
>
> <PAGE>
> <TAG1>
> SOME TEXT
> </TAG1>
> </PAGE>
>

You do not say how you are trying to process the xml file.  Typically
programs run into trouble like this because they think that the text will
all be delivered in one node (for DOM) or one callback (for SAX).  But that
would be a poor assumption.  The text may actually be delivered in several
chunks.  In this case, you might get [NEWLINE]SOME TEXT[NEWLINE].

Whether SAX, DOM or some other system, you must always make sure that you
collect (or traverse) all pieces that could contain the character data of an
element.

Cheers,

Tom P



  • References:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS