Re: [xmljs-users] New to XML-- question about a tag format
Brought to you by:
djoham,
witchhunter
From: David J. <dj...@ya...> - 2004-11-11 03:56:10
|
Hi Randy! <ingredient /> is an XML-legal way of saying "<ingredient></ingredient>" so it looks like the XML itself is OK. However, I just tried a simple test case with tags like that in both the classic DOM and W3C DOM parsers and was able to parse/read data just fine. Perhaps the XML is not well formed somewhere else? Here's the little test file recreation I put together. Maybe it will help us figure out what the problem is. The easiest place to put it is in the jsXMLParser directory... Best regards, David --- Fumigator <fum...@ar...> wrote: > HI! I'm playing with xml for <SCRIPT>, having fun, but have a > question. There is a specific xml file that was created by some > random guy that contains tags that look like this: > > <recipe name="Dark Brown" cost="1375" sellback="1250" skill="216"> > <ingredient quantity="1" name="Crushed Juniper Berries" dropped="0" /> > <ingredient quantity="1" name="Thin Metal Flask" dropped="0" /> > <ingredient quantity="6" name="Alum" dropped="0" /> > <ingredient quantity="6" name="Flask of Water" dropped="0" /> > </recipe> > > The Classic DOM does not parse the <ingredient> tags correctly. Or I > should say, I'm not sure that format of "<ingredient />", rather than > "<ingredient></ingredient>", is legal. > > Would the W3C DOM parse this tag correctly? I tried it first, but was > getting an exception error with it using Firefox. > > Any suggestions? > > -Randy Whitaker > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > xmljs-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmljs-users > |