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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML coming from a dataset

Status
Not open for further replies.

ac11nyc

Programmer
Oct 1, 2003
94
US
I have an XML coming back from the database that looks like this:
<?xml version="1.0" standalone="yes"?>
<DOCUMENT>
<FC_WEB_PROFILE>
<EmployeeId>63645ebc-ade5-4393-a9e7-dedf987a8c79</EmployeeId>
<FCName>Daniel Ramer</FCName>
<FCSiteName>Danny</FCSiteName>
<GroupName>PCG Group - Florham Park</GroupName>
<Title>SENIOR VICE PRESIDENT</Title>
<EmailAddress>Daniel.Ramer@RyanBeck.com</EmailAddress>
<PhoneNumber>800.325.2325</PhoneNumber>
<PhoneNumber2>973.135.4135</PhoneNumber2>
<FaxNumber />
<BranchName>Florham Park</BranchName>
<BranchAddress1>18 Columbia Turnpike</BranchAddress1>
<BranchAddress2 />
<BranchCity>Florham Park</BranchCity>
<BranchState>NJ</BranchState>
<BranchZip>07932</BranchZip>
<MissionStatement>Ramer's philosophy is simple - analyze every aspect of a client's current financial situation and generate solutions to improve overall portfolio performance and preserve a comfortable lifestyle.</MissionStatement>
<BusinessExperience>16 years of experience with some of the industry's most respected brokerage firms.</BusinessExperience>
<Associations />
<Recognitions />
<Education>Registered with the National Association of Security Dealers. </Education>
<AreasOfConcentration>Ramer's extensive experience in the financial services industry gives him the background to service a wide variety of clients.</AreasOfConcentration>
<AdministrativeStaff>Andres Cano</AdministrativeStaff>
<RegisteredStates>NY, NJ</RegisteredStates>
<StatusCode>C</StatusCode>
</FC_WEB_PROFILE>
</DOCUMENT>

Is there any possible way for me to exclude the DOCUMENT tag in order to merge with a stylesheet correctly?? Any help possible would be GREATLY appreciated
 
the document tag is the root element. you will need to programatically cycle through the file to avoid it.

how are you displaying the information to the browser, xslt? How is the root element effecting your formatting?

Jason Meckley
Database Analyst
WITF
 
No FC_WEB_PROFILE is the root element which is the reason that it is not transforming with the xsl correctly. Yes it is being displayed in xslt
 
the root element of an XML is the top teir in this case DOCUMENT.

DOCUMENT is probally the name of the data set. and FC_WEB_PROFILE is the name of the data table. then all your columns. try this in your xslt
Code:
<template match="/">
  <apply-templates />
</template>
<template match="DOCUMENT">
  <apply-templates />
</template>
<template match="FC_WEB_PROFILE">
  <!-- Apply formatting here -->
</template>


Jason Meckley
Database Analyst
WITF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top