Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New xml file not working

Status
Not open for further replies.

tburrows

Technical User
Oct 3, 2003
49
US
I have an xml file, xsl file, and an asp file which transforms the xml file using the xsl file and displays as html over the web.
I have another xml file that I am starting to use but I am getting nothing back.
The structure of the first xml file is:
<datatable>
<jmmain_nmmain_jfacilty>
<last>DOE</last>
<first>JOHN</first>
<middle>WAYNE</middle>
<suffix>JR</suffix>
<book_id>200208533</book_id>
<bookdate>12/23/2002</bookdate>
<jsection>CENT </jsection>
<unit>B </unit>
</jmmain_nmmain_jfacilty>
</datatable>

The second xml file is:
<datatable>
<jmmain_nmmain_archrg>
<last>DOE</last>
<first>JOHN</first>
<middle>WAYNE</middle>
<suffix>JR</suffix>
<race>W </race>
<sex>M</sex>
<book_id>200208533</book_id>
<bookdate>12/23/2002</bookdate>
<bondstatus>GL </bondstatus>
<bondamt>0</bondamt>
<fel_misd>M</fel_misd>
<chrgdesc>REVOCATION OF PR/BAIL</chrgdesc>
</jmmain_nmmain_archrg>
</datatable>

In the xsl file I changed the for-each statement from
&quot;/datatable/jmmain_nmmain_jfacilty&quot; (which works)
to
&quot;/datatable/jmmain_nmmain_archrg&quot; (which doesn't work)

The only change in the asp file is the name change of the file as I load them as ActiveXObjects.

Thanks for any ideas.

Tom Burrows
 
The problem might lie in the asp code you're working with.
This xsl statement looks up and spits out all nodes that are contained in datatable/jmmain_nmmain_archrg and in datatable/jmmain_nmmain_jfacilty respectively, so it shouldn't be a problem.

<xsl:for-each select=&quot;datatable/jmmain_nmmain_archrg&quot;>

<xsl:value-of select=&quot;.&quot;/>

</xsl:for-each>

<xsl:for-each select=&quot;datatable/jmmain_nmmain_jfacilty&quot;>

<xsl:value-of select=&quot;.&quot;/>

</xsl:for-each>

If you want to get a job done, ask a busy person. (Sherry Conway Appel - American writer)
 
I have found the problem. For some reason there is one field in the xml file that shuts down the conversion. As soon as I take the field out it works just fine. I've tried several other fields and it all boils down to this one field that is shutting down the conversion. The xml file is created from an oracle database. I've asked our IT dept to check the field.

Tom Burrows
 
THANKS -
When I open the xml file in IE it shows as well formed. Since I have around 200-300 records, I slowly scrolled down and around the middle it came up with an error because the field was using the < and > symbols. The file was coming up showing it was well formed and I was only looking as far as the first 10 or 20 records. This is a problem I can get changed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top