How to output between two xml tags?

CarlosAlc18

New Member
I have never seen tagging like this:
\[code\]<verse sID=".1.1" osisID=".1.1" /> data data <verse eID=".1.1"/> \[/code\]because I think it should be like this:
\[code\]<verse osisID=".1.1"> data data </verse>\[/code\]The problem is that I'm trying to output texts between \[code\]<verse/> texts <verse/>.\[/code\]I have lots of xml to disply texts between such open and close tags. It would work if \[code\]<verse> texts </verse>\[/code\].How to code in Java or PHP to output texts between these tags. I have coded it in PHP. \[code\]<?php$xml = simplexml_load_file("go.xml");foreach ($xml->osisText->div->p->verse as $verse) { echo $verse."<br/><br/>";}?> \[/code\]It does not work. I haven't tried in Java.
Below is sample xml.\[code\]<?xml version="1.0" encoding="UTF-8"?><osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace http://www.bibletechnologies.net/osisCore.2.1.1.xsd"> <osisText xml:lang="en"> <chapter sID=".1" osisID=".1"/> <div type="section"> <p> <verse sID=".1.1" osisID=".1.1" /> Hello Verse One <verse eID=".1.1" osisID=".1.1" /> <verse sID=".1.2" osisID=".1.2" /> Hello Verse Two <verse eID=".1.2" osisID=".1.2" /> </p> <p> <verse sID=".1.3" osisID=".1.3" /> Hello Verse One <verse eID=".1.3" osisID=".1.3" /> <verse sID=".1.4" osisID=".1.4" /> Hello Verse Two <verse eID=".1.4" osisID=".1.4" /> </p> </div> </osisText></osis>\[/code\]
 
Top