473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Rendering XML to form and saving it back to XML

ken
I have a XML file as below
----------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" standalone="yes"?>

<BorrowerContainer>
<ID_BorrowerID value = "BO_1"/>
<BOCO_REOPropertiesNo value = "1"/>
<BorrowerName>
<BN_LastName value = "TESTCO"/>
<BN_FirstName value = "NHI"/>
<BN_FullName value = "NHI TESTCO"/>
</BorrowerName>
<BorrowerContact>
<BC_HomePhoneNumber value = "5525235515"/>
</BorrowerContact>
<BorrowerProfile>
<BP_SSNo value = "SS000158634"/>
<BP_ApplicantType value = "Applicant"/>
<BP_Citizenship value = "USCitizen"/>
<BP_EntityType value = "Individual"/>
<BP_MaritalStatus value = "Married"/>
<BP_BorrowerAge value = "37"/>
<BP_DependentsNo value = "0"/>
<BP_IsPrimaryBorrower value = "Y"/>
<BP_YearsInCurrentProfession value = "0"/>
<BP_EmploymentGaps value = "0"/>
<BP_ResidualIncomeAmount value = "4363.74"/>
</BorrowerProfile>
<BorrowerDeclarations>
<BD_HasIntentToOccupy value = "Y"/>
<BD_HasDeclaredBankruptcy value = "N"/>
<BD_HasForeclosure value = "N"/>
<BD_HasOwnershipInterest value = "Y"/>
<BD_TypeOfPropertyOwned value = "Primary Residence"/>
<BD_HowTitleWasHeld value = "Sole"/>
<BD_HasSupportObligations value = "N"/>
<BD_HasJudgments value = "N"/>
<BD_IsPartyToLawSuit value = "N"/>
<BD_HasLoanObligations value = "N"/>
<BD_HasCurrentFederalDelinquency value = "N"/>
<BD_IsPartDownPaymentBorrowed value = "N"/>
<BD_IsEndorserOnAnyNote value = "N"/>
</BorrowerDeclarations>
<BorrowerResidence>
<BR_OwnOrRent value = "Rent"/>
<BR_ResidenceType value = "Current"/>
<BR_MonthsInResidency value = "84"/>
</BorrowerResidence>
<BorrowerComponentData>
<BorrowerIncome>
<ID_IncomeID value = "IN_1_1"/>
<IN_Type value = "Social Security"/>
<IN_MonthlyAmount value = "4500"/>
<IN_IsTaxFree value = "Y"/>
</BorrowerIncome>
<BorrowerEmployment>
<ID_IncomeReference value = "IN_1_1"/>
<EM_IsSelfEmployed value = "N"/>
<EM_IsWageEarner value = "N"/>
<EM_IsCurrentJob value = "Y"/>
<EM_IsPrimaryJob value = "Y"/>
<EM_MonthsOnJob value = "0"/>
</BorrowerEmployment>
</BorrowerComponentData>
</BorrowerContainer>
<PropertyContainer>
<ID_PropertyID value = "PR_1_1"/>
<PropertyData>
<PD_PropertyType value = "SF Detached"/>
<PD_PropertyStatus value = "Refinance"/>
<PD_IsCurrentResidence value = "Y"/>
<PD_IsSubjectProperty value = "Y"/>
</PropertyData>
<SubjectPropertyData>
<SU_Residency value = "Primary Residence"/>
<SU_UnitsNo value = "1"/>
<SU_AppraisedValue value = "320000"/>
<SU_AppraisedDate value = "10/1/2004"/>
<SU_EstimatedValue value = "320000"/>
<SU_EstateHeld value = "Fee Simple"/>
<SU_MonthlyExpenses value = "1716.26"/>
<SU_IsRural value = "N"/>
</SubjectPropertyData>
<PropertyAddress>
<AD_AddressOf value = "Subject"/>
<AD_Address value = "331 BOUNDARY S ST "/>
<AD_CityName value = "SAN DIEGO"/>
<AD_StateCode value = "CA"/>
<AD_ZipCode5 value = "92104"/>
<AD_Area value = "CA"/>
</PropertyAddress>
<LienContainer>
<ID_LienID value = "LN_1_1"/>
<LC_TradelineRef value = "1"/>
<LienProfile>
<LP_LienPosition value = "1"/>
<LP_IsNew value = "N"/>
<LP_LoanType value = "Conventional"/>
<LP_LoanNumber value = "3331191433682"/>
<LP_IsToBePaidOff value = "Y"/>
<LP_LienHolder value = "Test HOME"/>
</LienProfile>
<MortgageData>
<MD_LienAmount value = "0"/>
<MD_MonthlyPayment value = "855"/>
<MD_RemainingBalance value = "238750"/>
</MortgageData>
</LienContainer>
<PropertyOwnership>
<ID_BorrowerReference value = "BO_1"/>
</PropertyOwnership>
</PropertyContainer>
</Template>

-------------------------------------------------------------------------------------------------------------------------
I want to render it in a form (like an editable form with textboxes) and the
save button at the bottom.
I am using c# any ideas ..... The above xml can be considered as name value
pair so the rendered form would have label for each field (non editable) and
the corresponding value as text box editable

Thanks
Ken.
Jul 21 '05 #1
5 1509

Have you looked at XSL style sheets?

ken wrote:
I have a XML file as below;
----------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" standalone="yes"?>

<BorrowerContainer>
<ID_BorrowerID value = "BO_1"/>
<BOCO_REOPropertiesNo value = "1"/>
<BorrowerName>
<BN_LastName value = "TESTCO"/>
<BN_FirstName value = "NHI"/>
<BN_FullName value = "NHI TESTCO"/>
</BorrowerName>
<BorrowerContact>
<BC_HomePhoneNumber value = "5525235515"/>
</BorrowerContact>
<BorrowerProfile>
<BP_SSNo value = "SS000158634"/>
<BP_ApplicantType value = "Applicant"/>
<BP_Citizenship value = "USCitizen"/>
<BP_EntityType value = "Individual"/>
<BP_MaritalStatus value = "Married"/>
<BP_BorrowerAge value = "37"/>
<BP_DependentsNo value = "0"/>
<BP_IsPrimaryBorrower value = "Y"/>
<BP_YearsInCurrentProfession value = "0"/>
<BP_EmploymentGaps value = "0"/>
<BP_ResidualIncomeAmount value = "4363.74"/>
</BorrowerProfile>
<BorrowerDeclarations>
<BD_HasIntentToOccupy value = "Y"/>
<BD_HasDeclaredBankruptcy value = "N"/>
<BD_HasForeclosure value = "N"/>
<BD_HasOwnershipInterest value = "Y"/>
<BD_TypeOfPropertyOwned value = "Primary Residence"/>
<BD_HowTitleWasHeld value = "Sole"/>
<BD_HasSupportObligations value = "N"/>
<BD_HasJudgments value = "N"/>
<BD_IsPartyToLawSuit value = "N"/>
<BD_HasLoanObligations value = "N"/>
<BD_HasCurrentFederalDelinquency value = "N"/>
<BD_IsPartDownPaymentBorrowed value = "N"/>
<BD_IsEndorserOnAnyNote value = "N"/>
</BorrowerDeclarations>
<BorrowerResidence>
<BR_OwnOrRent value = "Rent"/>
<BR_ResidenceType value = "Current"/>
<BR_MonthsInResidency value = "84"/>
</BorrowerResidence>
<BorrowerComponentData>
<BorrowerIncome>
<ID_IncomeID value = "IN_1_1"/>
<IN_Type value = "Social Security"/>
<IN_MonthlyAmount value = "4500"/>
<IN_IsTaxFree value = "Y"/>
</BorrowerIncome>
<BorrowerEmployment>
<ID_IncomeReference value = "IN_1_1"/>
<EM_IsSelfEmployed value = "N"/>
<EM_IsWageEarner value = "N"/>
<EM_IsCurrentJob value = "Y"/>
<EM_IsPrimaryJob value = "Y"/>
<EM_MonthsOnJob value = "0"/>
</BorrowerEmployment>
</BorrowerComponentData>
</BorrowerContainer>
<PropertyContainer>
<ID_PropertyID value = "PR_1_1"/>
<PropertyData>
<PD_PropertyType value = "SF Detached"/>
<PD_PropertyStatus value = "Refinance"/>
<PD_IsCurrentResidence value = "Y"/>
<PD_IsSubjectProperty value = "Y"/>
</PropertyData>
<SubjectPropertyData>
<SU_Residency value = "Primary Residence"/>
<SU_UnitsNo value = "1"/>
<SU_AppraisedValue value = "320000"/>
<SU_AppraisedDate value = "10/1/2004"/>
<SU_EstimatedValue value = "320000"/>
<SU_EstateHeld value = "Fee Simple"/>
<SU_MonthlyExpenses value = "1716.26"/>
<SU_IsRural value = "N"/>
</SubjectPropertyData>
<PropertyAddress>
<AD_AddressOf value = "Subject"/>
<AD_Address value = "331 BOUNDARY S ST "/>
<AD_CityName value = "SAN DIEGO"/>
<AD_StateCode value = "CA"/>
<AD_ZipCode5 value = "92104"/>
<AD_Area value = "CA"/>
</PropertyAddress>
<LienContainer>
<ID_LienID value = "LN_1_1"/>
<LC_TradelineRef value = "1"/>
<LienProfile>
<LP_LienPosition value = "1"/>
<LP_IsNew value = "N"/>
<LP_LoanType value = "Conventional"/>
<LP_LoanNumber value = "3331191433682"/>
<LP_IsToBePaidOff value = "Y"/>
<LP_LienHolder value = "Test HOME"/>
</LienProfile>
<MortgageData>
<MD_LienAmount value = "0"/>
<MD_MonthlyPayment value = "855"/>
<MD_RemainingBalance value = "238750"/>
</MortgageData>
</LienContainer>
<PropertyOwnership>
<ID_BorrowerReference value = "BO_1"/>
</PropertyOwnership>
</PropertyContainer>
</Template>

-------------------------------------------------------------------------------------------------------------------------
I want to render it in a form (like an editable form with textboxes) and the
save button at the bottom.
I am using c# any ideas ..... The above xml can be considered as name value
pair so the rendered form would have label for each field (non editable) and
the corresponding value as text box editable

Thanks
Ken.

Jul 21 '05 #2
you wouldn't happen to have access to Infopath, would you? It is part of
Office 2003. If so, you are practically done already :-)

If you have a schema for this document, that's better. If not, create one (I
think the XSD.exe utility that comes with the framework can do it).

Load the schema into Infopath as your data type, and simply drag the entire
structure to the drawing surface. you will have a completely viewable, (and
customizable) surface to make your form look good. Tweak it. Add text,
colors, etc. Save it as a template (.xsn). If your users have Infopath,
then you only need to add the infopath tag to the XML in order for them to
simply open the XML and it will use your template to display the data.

If your users don't have Infopath, then you can extract this template as a
style sheet (the easiest way to create a stylesheet, IMHO). Look in help
for File->Export.

Best developer tool around... and it's part of Office. Go figure.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"ken" <ke*@discussions.microsoft.com> wrote in message
news:21**********************************@microsof t.com...
I have a XML file as below;
-------------------------------------------------------------------------- -------------------------------------------- <?xml version="1.0" standalone="yes"?>

<BorrowerContainer>
<ID_BorrowerID value = "BO_1"/>
<BOCO_REOPropertiesNo value = "1"/>
<BorrowerName>
<BN_LastName value = "TESTCO"/>
<BN_FirstName value = "NHI"/>
<BN_FullName value = "NHI TESTCO"/>
</BorrowerName>
<BorrowerContact>
<BC_HomePhoneNumber value = "5525235515"/>
</BorrowerContact>
<BorrowerProfile>
<BP_SSNo value = "SS000158634"/>
<BP_ApplicantType value = "Applicant"/>
<BP_Citizenship value = "USCitizen"/>
<BP_EntityType value = "Individual"/>
<BP_MaritalStatus value = "Married"/>
<BP_BorrowerAge value = "37"/>
<BP_DependentsNo value = "0"/>
<BP_IsPrimaryBorrower value = "Y"/>
<BP_YearsInCurrentProfession value = "0"/>
<BP_EmploymentGaps value = "0"/>
<BP_ResidualIncomeAmount value = "4363.74"/>
</BorrowerProfile>
<BorrowerDeclarations>
<BD_HasIntentToOccupy value = "Y"/>
<BD_HasDeclaredBankruptcy value = "N"/>
<BD_HasForeclosure value = "N"/>
<BD_HasOwnershipInterest value = "Y"/>
<BD_TypeOfPropertyOwned value = "Primary Residence"/>
<BD_HowTitleWasHeld value = "Sole"/>
<BD_HasSupportObligations value = "N"/>
<BD_HasJudgments value = "N"/>
<BD_IsPartyToLawSuit value = "N"/>
<BD_HasLoanObligations value = "N"/>
<BD_HasCurrentFederalDelinquency value = "N"/>
<BD_IsPartDownPaymentBorrowed value = "N"/>
<BD_IsEndorserOnAnyNote value = "N"/>
</BorrowerDeclarations>
<BorrowerResidence>
<BR_OwnOrRent value = "Rent"/>
<BR_ResidenceType value = "Current"/>
<BR_MonthsInResidency value = "84"/>
</BorrowerResidence>
<BorrowerComponentData>
<BorrowerIncome>
<ID_IncomeID value = "IN_1_1"/>
<IN_Type value = "Social Security"/>
<IN_MonthlyAmount value = "4500"/>
<IN_IsTaxFree value = "Y"/>
</BorrowerIncome>
<BorrowerEmployment>
<ID_IncomeReference value = "IN_1_1"/>
<EM_IsSelfEmployed value = "N"/>
<EM_IsWageEarner value = "N"/>
<EM_IsCurrentJob value = "Y"/>
<EM_IsPrimaryJob value = "Y"/>
<EM_MonthsOnJob value = "0"/>
</BorrowerEmployment>
</BorrowerComponentData>
</BorrowerContainer>
<PropertyContainer>
<ID_PropertyID value = "PR_1_1"/>
<PropertyData>
<PD_PropertyType value = "SF Detached"/>
<PD_PropertyStatus value = "Refinance"/>
<PD_IsCurrentResidence value = "Y"/>
<PD_IsSubjectProperty value = "Y"/>
</PropertyData>
<SubjectPropertyData>
<SU_Residency value = "Primary Residence"/>
<SU_UnitsNo value = "1"/>
<SU_AppraisedValue value = "320000"/>
<SU_AppraisedDate value = "10/1/2004"/>
<SU_EstimatedValue value = "320000"/>
<SU_EstateHeld value = "Fee Simple"/>
<SU_MonthlyExpenses value = "1716.26"/>
<SU_IsRural value = "N"/>
</SubjectPropertyData>
<PropertyAddress>
<AD_AddressOf value = "Subject"/>
<AD_Address value = "331 BOUNDARY S ST "/>
<AD_CityName value = "SAN DIEGO"/>
<AD_StateCode value = "CA"/>
<AD_ZipCode5 value = "92104"/>
<AD_Area value = "CA"/>
</PropertyAddress>
<LienContainer>
<ID_LienID value = "LN_1_1"/>
<LC_TradelineRef value = "1"/>
<LienProfile>
<LP_LienPosition value = "1"/>
<LP_IsNew value = "N"/>
<LP_LoanType value = "Conventional"/>
<LP_LoanNumber value = "3331191433682"/>
<LP_IsToBePaidOff value = "Y"/>
<LP_LienHolder value = "Test HOME"/>
</LienProfile>
<MortgageData>
<MD_LienAmount value = "0"/>
<MD_MonthlyPayment value = "855"/>
<MD_RemainingBalance value = "238750"/>
</MortgageData>
</LienContainer>
<PropertyOwnership>
<ID_BorrowerReference value = "BO_1"/>
</PropertyOwnership>
</PropertyContainer>
</Template>

-------------------------------------------------------------------------- -----------------------------------------------

I want to render it in a form (like an editable form with textboxes) and the save button at the bottom.
I am using c# any ideas ..... The above xml can be considered as name value pair so the rendered form would have label for each field (non editable) and the corresponding value as text box editable

Thanks
Ken.

Jul 21 '05 #3
Ken
Thanks for the info . I do have infopath.
One thing though I was able to show the info in the form . How would i be
able to store the modified values from the textboxes back in the xml format?

Thanks

"Nick Malik [Microsoft]" wrote:
you wouldn't happen to have access to Infopath, would you? It is part of
Office 2003. If so, you are practically done already :-)

If you have a schema for this document, that's better. If not, create one (I
think the XSD.exe utility that comes with the framework can do it).

Load the schema into Infopath as your data type, and simply drag the entire
structure to the drawing surface. you will have a completely viewable, (and
customizable) surface to make your form look good. Tweak it. Add text,
colors, etc. Save it as a template (.xsn). If your users have Infopath,
then you only need to add the infopath tag to the XML in order for them to
simply open the XML and it will use your template to display the data.

If your users don't have Infopath, then you can extract this template as a
style sheet (the easiest way to create a stylesheet, IMHO). Look in help
for File->Export.

Best developer tool around... and it's part of Office. Go figure.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"ken" <ke*@discussions.microsoft.com> wrote in message
news:21**********************************@microsof t.com...
I have a XML file as below;
--------------------------------------------------------------------------

--------------------------------------------
<?xml version="1.0" standalone="yes"?>

<BorrowerContainer>
<ID_BorrowerID value = "BO_1"/>
<BOCO_REOPropertiesNo value = "1"/>
<BorrowerName>
<BN_LastName value = "TESTCO"/>
<BN_FirstName value = "NHI"/>
<BN_FullName value = "NHI TESTCO"/>
</BorrowerName>
<BorrowerContact>
<BC_HomePhoneNumber value = "5525235515"/>
</BorrowerContact>
<BorrowerProfile>
<BP_SSNo value = "SS000158634"/>
<BP_ApplicantType value = "Applicant"/>
<BP_Citizenship value = "USCitizen"/>
<BP_EntityType value = "Individual"/>
<BP_MaritalStatus value = "Married"/>
<BP_BorrowerAge value = "37"/>
<BP_DependentsNo value = "0"/>
<BP_IsPrimaryBorrower value = "Y"/>
<BP_YearsInCurrentProfession value = "0"/>
<BP_EmploymentGaps value = "0"/>
<BP_ResidualIncomeAmount value = "4363.74"/>
</BorrowerProfile>
<BorrowerDeclarations>
<BD_HasIntentToOccupy value = "Y"/>
<BD_HasDeclaredBankruptcy value = "N"/>
<BD_HasForeclosure value = "N"/>
<BD_HasOwnershipInterest value = "Y"/>
<BD_TypeOfPropertyOwned value = "Primary Residence"/>
<BD_HowTitleWasHeld value = "Sole"/>
<BD_HasSupportObligations value = "N"/>
<BD_HasJudgments value = "N"/>
<BD_IsPartyToLawSuit value = "N"/>
<BD_HasLoanObligations value = "N"/>
<BD_HasCurrentFederalDelinquency value = "N"/>
<BD_IsPartDownPaymentBorrowed value = "N"/>
<BD_IsEndorserOnAnyNote value = "N"/>
</BorrowerDeclarations>
<BorrowerResidence>
<BR_OwnOrRent value = "Rent"/>
<BR_ResidenceType value = "Current"/>
<BR_MonthsInResidency value = "84"/>
</BorrowerResidence>
<BorrowerComponentData>
<BorrowerIncome>
<ID_IncomeID value = "IN_1_1"/>
<IN_Type value = "Social Security"/>
<IN_MonthlyAmount value = "4500"/>
<IN_IsTaxFree value = "Y"/>
</BorrowerIncome>
<BorrowerEmployment>
<ID_IncomeReference value = "IN_1_1"/>
<EM_IsSelfEmployed value = "N"/>
<EM_IsWageEarner value = "N"/>
<EM_IsCurrentJob value = "Y"/>
<EM_IsPrimaryJob value = "Y"/>
<EM_MonthsOnJob value = "0"/>
</BorrowerEmployment>
</BorrowerComponentData>
</BorrowerContainer>
<PropertyContainer>
<ID_PropertyID value = "PR_1_1"/>
<PropertyData>
<PD_PropertyType value = "SF Detached"/>
<PD_PropertyStatus value = "Refinance"/>
<PD_IsCurrentResidence value = "Y"/>
<PD_IsSubjectProperty value = "Y"/>
</PropertyData>
<SubjectPropertyData>
<SU_Residency value = "Primary Residence"/>
<SU_UnitsNo value = "1"/>
<SU_AppraisedValue value = "320000"/>
<SU_AppraisedDate value = "10/1/2004"/>
<SU_EstimatedValue value = "320000"/>
<SU_EstateHeld value = "Fee Simple"/>
<SU_MonthlyExpenses value = "1716.26"/>
<SU_IsRural value = "N"/>
</SubjectPropertyData>
<PropertyAddress>
<AD_AddressOf value = "Subject"/>
<AD_Address value = "331 BOUNDARY S ST "/>
<AD_CityName value = "SAN DIEGO"/>
<AD_StateCode value = "CA"/>
<AD_ZipCode5 value = "92104"/>
<AD_Area value = "CA"/>
</PropertyAddress>
<LienContainer>
<ID_LienID value = "LN_1_1"/>
<LC_TradelineRef value = "1"/>
<LienProfile>
<LP_LienPosition value = "1"/>
<LP_IsNew value = "N"/>
<LP_LoanType value = "Conventional"/>
<LP_LoanNumber value = "3331191433682"/>
<LP_IsToBePaidOff value = "Y"/>
<LP_LienHolder value = "Test HOME"/>
</LienProfile>
<MortgageData>
<MD_LienAmount value = "0"/>
<MD_MonthlyPayment value = "855"/>
<MD_RemainingBalance value = "238750"/>
</MortgageData>
</LienContainer>
<PropertyOwnership>
<ID_BorrowerReference value = "BO_1"/>
</PropertyOwnership>
</PropertyContainer>
</Template>

--------------------------------------------------------------------------

-----------------------------------------------


I want to render it in a form (like an editable form with textboxes) and

the
save button at the bottom.
I am using c# any ideas ..... The above xml can be considered as name

value
pair so the rendered form would have label for each field (non editable)

and
the corresponding value as text box editable

Thanks
Ken.


Jul 21 '05 #4
Couldn't be easier.
When the user clicks Save, an xml file is output with the modified values.

There is a cool feature that you can use in addition. If you want, you can
create a data source in Infopath and submit the entire XML document to a web
service.

Note: Make sure that you, when developing the form, have Office
2003 Service Pack 1 installed on your machine.
If you do, then any user opening the form will be prompted to
also install SP1. This is imperative if you plan to
submit to a web service.
http://support.microsoft.com/default...b;en-us;826989

On the other hand, if you are using Sharepoint as your data store (Windows
Sharepoint Services is a free download, as long as the server is running
Windows Server 2003), then the fact that the user clicks Save actually has
the effect of submitting the entire XML document to Sharepoint. (There are
no bugs in this functionality that requires a service pack, thank goodness).

so, a couple of options:
Save -> to file (works fine)
Save -> to Sharepoint (works fine)
Submit -> to Sharepoint (works fine)
Submit -> to Webservice (requires Office SP1 to fix a goofy design
decision)

Hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Ken" <Ke*@discussions.microsoft.com> wrote in message
news:56**********************************@microsof t.com...
Thanks for the info . I do have infopath.
One thing though I was able to show the info in the form . How would i be
able to store the modified values from the textboxes back in the xml format?
Thanks

"Nick Malik [Microsoft]" wrote:
you wouldn't happen to have access to Infopath, would you? It is part of Office 2003. If so, you are practically done already :-)

If you have a schema for this document, that's better. If not, create one (I think the XSD.exe utility that comes with the framework can do it).

Load the schema into Infopath as your data type, and simply drag the entire structure to the drawing surface. you will have a completely viewable, (and customizable) surface to make your form look good. Tweak it. Add text,
colors, etc. Save it as a template (.xsn). If your users have Infopath, then you only need to add the infopath tag to the XML in order for them to simply open the XML and it will use your template to display the data.

If your users don't have Infopath, then you can extract this template as a style sheet (the easiest way to create a stylesheet, IMHO). Look in help for File->Export.

Best developer tool around... and it's part of Office. Go figure.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"ken" <ke*@discussions.microsoft.com> wrote in message
news:21**********************************@microsof t.com...
I have a XML file as below;

--------------------------------------------------------------------------
--------------------------------------------
<?xml version="1.0" standalone="yes"?>

<BorrowerContainer>
<ID_BorrowerID value = "BO_1"/>
<BOCO_REOPropertiesNo value = "1"/>
<BorrowerName>
<BN_LastName value = "TESTCO"/>
<BN_FirstName value = "NHI"/>
<BN_FullName value = "NHI TESTCO"/>
</BorrowerName>
<BorrowerContact>
<BC_HomePhoneNumber value = "5525235515"/>
</BorrowerContact>
<BorrowerProfile>
<BP_SSNo value = "SS000158634"/>
<BP_ApplicantType value = "Applicant"/>
<BP_Citizenship value = "USCitizen"/>
<BP_EntityType value = "Individual"/>
<BP_MaritalStatus value = "Married"/>
<BP_BorrowerAge value = "37"/>
<BP_DependentsNo value = "0"/>
<BP_IsPrimaryBorrower value = "Y"/>
<BP_YearsInCurrentProfession value = "0"/>
<BP_EmploymentGaps value = "0"/>
<BP_ResidualIncomeAmount value = "4363.74"/>
</BorrowerProfile>
<BorrowerDeclarations>
<BD_HasIntentToOccupy value = "Y"/>
<BD_HasDeclaredBankruptcy value = "N"/>
<BD_HasForeclosure value = "N"/>
<BD_HasOwnershipInterest value = "Y"/>
<BD_TypeOfPropertyOwned value = "Primary Residence"/>
<BD_HowTitleWasHeld value = "Sole"/>
<BD_HasSupportObligations value = "N"/>
<BD_HasJudgments value = "N"/>
<BD_IsPartyToLawSuit value = "N"/>
<BD_HasLoanObligations value = "N"/>
<BD_HasCurrentFederalDelinquency value = "N"/>
<BD_IsPartDownPaymentBorrowed value = "N"/>
<BD_IsEndorserOnAnyNote value = "N"/>
</BorrowerDeclarations>
<BorrowerResidence>
<BR_OwnOrRent value = "Rent"/>
<BR_ResidenceType value = "Current"/>
<BR_MonthsInResidency value = "84"/>
</BorrowerResidence>
<BorrowerComponentData>
<BorrowerIncome>
<ID_IncomeID value = "IN_1_1"/>
<IN_Type value = "Social Security"/>
<IN_MonthlyAmount value = "4500"/>
<IN_IsTaxFree value = "Y"/>
</BorrowerIncome>
<BorrowerEmployment>
<ID_IncomeReference value = "IN_1_1"/>
<EM_IsSelfEmployed value = "N"/>
<EM_IsWageEarner value = "N"/>
<EM_IsCurrentJob value = "Y"/>
<EM_IsPrimaryJob value = "Y"/>
<EM_MonthsOnJob value = "0"/>
</BorrowerEmployment>
</BorrowerComponentData>
</BorrowerContainer>
<PropertyContainer>
<ID_PropertyID value = "PR_1_1"/>
<PropertyData>
<PD_PropertyType value = "SF Detached"/>
<PD_PropertyStatus value = "Refinance"/>
<PD_IsCurrentResidence value = "Y"/>
<PD_IsSubjectProperty value = "Y"/>
</PropertyData>
<SubjectPropertyData>
<SU_Residency value = "Primary Residence"/>
<SU_UnitsNo value = "1"/>
<SU_AppraisedValue value = "320000"/>
<SU_AppraisedDate value = "10/1/2004"/>
<SU_EstimatedValue value = "320000"/>
<SU_EstateHeld value = "Fee Simple"/>
<SU_MonthlyExpenses value = "1716.26"/>
<SU_IsRural value = "N"/>
</SubjectPropertyData>
<PropertyAddress>
<AD_AddressOf value = "Subject"/>
<AD_Address value = "331 BOUNDARY S ST "/>
<AD_CityName value = "SAN DIEGO"/>
<AD_StateCode value = "CA"/>
<AD_ZipCode5 value = "92104"/>
<AD_Area value = "CA"/>
</PropertyAddress>
<LienContainer>
<ID_LienID value = "LN_1_1"/>
<LC_TradelineRef value = "1"/>
<LienProfile>
<LP_LienPosition value = "1"/>
<LP_IsNew value = "N"/>
<LP_LoanType value = "Conventional"/>
<LP_LoanNumber value = "3331191433682"/>
<LP_IsToBePaidOff value = "Y"/>
<LP_LienHolder value = "Test HOME"/>
</LienProfile>
<MortgageData>
<MD_LienAmount value = "0"/>
<MD_MonthlyPayment value = "855"/>
<MD_RemainingBalance value = "238750"/>
</MortgageData>
</LienContainer>
<PropertyOwnership>
<ID_BorrowerReference value = "BO_1"/>
</PropertyOwnership>
</PropertyContainer>
</Template>

--------------------------------------------------------------------------
-----------------------------------------------


I want to render it in a form (like an editable form with textboxes)
and the
save button at the bottom.
I am using c# any ideas ..... The above xml can be considered as name

value
pair so the rendered form would have label for each field (non
editable) and
the corresponding value as text box editable

Thanks
Ken.


Jul 21 '05 #5
Ken
I am not sure whether I can use the INFOPATH Solution .
Reasons being
1) Looking for preferably web solution (the rendered xml can be opened in IE
and displaying all the form elements which are editable)
2) The Values in the XML file is going to change everytime since new XML
files with different values but with same attributes/element will be
avilable.. I need to create an application that will load this XML with its
values dynamically .

"Nick Malik [Microsoft]" wrote:
Couldn't be easier.
When the user clicks Save, an xml file is output with the modified values.

There is a cool feature that you can use in addition. If you want, you can
create a data source in Infopath and submit the entire XML document to a web
service.

Note: Make sure that you, when developing the form, have Office
2003 Service Pack 1 installed on your machine.
If you do, then any user opening the form will be prompted to
also install SP1. This is imperative if you plan to
submit to a web service.
http://support.microsoft.com/default...b;en-us;826989

On the other hand, if you are using Sharepoint as your data store (Windows
Sharepoint Services is a free download, as long as the server is running
Windows Server 2003), then the fact that the user clicks Save actually has
the effect of submitting the entire XML document to Sharepoint. (There are
no bugs in this functionality that requires a service pack, thank goodness).

so, a couple of options:
Save -> to file (works fine)
Save -> to Sharepoint (works fine)
Submit -> to Sharepoint (works fine)
Submit -> to Webservice (requires Office SP1 to fix a goofy design
decision)

Hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Ken" <Ke*@discussions.microsoft.com> wrote in message
news:56**********************************@microsof t.com...
Thanks for the info . I do have infopath.
One thing though I was able to show the info in the form . How would i be
able to store the modified values from the textboxes back in the xml

format?

Thanks

"Nick Malik [Microsoft]" wrote:
you wouldn't happen to have access to Infopath, would you? It is part of Office 2003. If so, you are practically done already :-)

If you have a schema for this document, that's better. If not, create one (I think the XSD.exe utility that comes with the framework can do it).

Load the schema into Infopath as your data type, and simply drag the entire structure to the drawing surface. you will have a completely viewable, (and customizable) surface to make your form look good. Tweak it. Add text,
colors, etc. Save it as a template (.xsn). If your users have Infopath, then you only need to add the infopath tag to the XML in order for them to simply open the XML and it will use your template to display the data.

If your users don't have Infopath, then you can extract this template as a style sheet (the easiest way to create a stylesheet, IMHO). Look in help for File->Export.

Best developer tool around... and it's part of Office. Go figure.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"ken" <ke*@discussions.microsoft.com> wrote in message
news:21**********************************@microsof t.com...
> I have a XML file as below;

--------------------------------------------------------------------------
--------------------------------------------
> <?xml version="1.0" standalone="yes"?>
>
> <BorrowerContainer>
> <ID_BorrowerID value = "BO_1"/>
> <BOCO_REOPropertiesNo value = "1"/>
> <BorrowerName>
> <BN_LastName value = "TESTCO"/>
> <BN_FirstName value = "NHI"/>
> <BN_FullName value = "NHI TESTCO"/>
> </BorrowerName>
> <BorrowerContact>
> <BC_HomePhoneNumber value = "5525235515"/>
> </BorrowerContact>
> <BorrowerProfile>
> <BP_SSNo value = "SS000158634"/>
> <BP_ApplicantType value = "Applicant"/>
> <BP_Citizenship value = "USCitizen"/>
> <BP_EntityType value = "Individual"/>
> <BP_MaritalStatus value = "Married"/>
> <BP_BorrowerAge value = "37"/>
> <BP_DependentsNo value = "0"/>
> <BP_IsPrimaryBorrower value = "Y"/>
> <BP_YearsInCurrentProfession value = "0"/>
> <BP_EmploymentGaps value = "0"/>
> <BP_ResidualIncomeAmount value = "4363.74"/>
> </BorrowerProfile>
> <BorrowerDeclarations>
> <BD_HasIntentToOccupy value = "Y"/>
> <BD_HasDeclaredBankruptcy value = "N"/>
> <BD_HasForeclosure value = "N"/>
> <BD_HasOwnershipInterest value = "Y"/>
> <BD_TypeOfPropertyOwned value = "Primary Residence"/>
> <BD_HowTitleWasHeld value = "Sole"/>
> <BD_HasSupportObligations value = "N"/>
> <BD_HasJudgments value = "N"/>
> <BD_IsPartyToLawSuit value = "N"/>
> <BD_HasLoanObligations value = "N"/>
> <BD_HasCurrentFederalDelinquency value = "N"/>
> <BD_IsPartDownPaymentBorrowed value = "N"/>
> <BD_IsEndorserOnAnyNote value = "N"/>
> </BorrowerDeclarations>
> <BorrowerResidence>
> <BR_OwnOrRent value = "Rent"/>
> <BR_ResidenceType value = "Current"/>
> <BR_MonthsInResidency value = "84"/>
> </BorrowerResidence>
> <BorrowerComponentData>
> <BorrowerIncome>
> <ID_IncomeID value = "IN_1_1"/>
> <IN_Type value = "Social Security"/>
> <IN_MonthlyAmount value = "4500"/>
> <IN_IsTaxFree value = "Y"/>
> </BorrowerIncome>
> <BorrowerEmployment>
> <ID_IncomeReference value = "IN_1_1"/>
> <EM_IsSelfEmployed value = "N"/>
> <EM_IsWageEarner value = "N"/>
> <EM_IsCurrentJob value = "Y"/>
> <EM_IsPrimaryJob value = "Y"/>
> <EM_MonthsOnJob value = "0"/>
> </BorrowerEmployment>
> </BorrowerComponentData>
> </BorrowerContainer>
> <PropertyContainer>
> <ID_PropertyID value = "PR_1_1"/>
> <PropertyData>
> <PD_PropertyType value = "SF Detached"/>
> <PD_PropertyStatus value = "Refinance"/>
> <PD_IsCurrentResidence value = "Y"/>
> <PD_IsSubjectProperty value = "Y"/>
> </PropertyData>
> <SubjectPropertyData>
> <SU_Residency value = "Primary Residence"/>
> <SU_UnitsNo value = "1"/>
> <SU_AppraisedValue value = "320000"/>
> <SU_AppraisedDate value = "10/1/2004"/>
> <SU_EstimatedValue value = "320000"/>
> <SU_EstateHeld value = "Fee Simple"/>
> <SU_MonthlyExpenses value = "1716.26"/>
> <SU_IsRural value = "N"/>
> </SubjectPropertyData>
> <PropertyAddress>
> <AD_AddressOf value = "Subject"/>
> <AD_Address value = "331 BOUNDARY S ST "/>
> <AD_CityName value = "SAN DIEGO"/>
> <AD_StateCode value = "CA"/>
> <AD_ZipCode5 value = "92104"/>
> <AD_Area value = "CA"/>
> </PropertyAddress>
> <LienContainer>
> <ID_LienID value = "LN_1_1"/>
> <LC_TradelineRef value = "1"/>
> <LienProfile>
> <LP_LienPosition value = "1"/>
> <LP_IsNew value = "N"/>
> <LP_LoanType value = "Conventional"/>
> <LP_LoanNumber value = "3331191433682"/>
> <LP_IsToBePaidOff value = "Y"/>
> <LP_LienHolder value = "Test HOME"/>
> </LienProfile>
> <MortgageData>
> <MD_LienAmount value = "0"/>
> <MD_MonthlyPayment value = "855"/>
> <MD_RemainingBalance value = "238750"/>
> </MortgageData>
> </LienContainer>
> <PropertyOwnership>
> <ID_BorrowerReference value = "BO_1"/>
> </PropertyOwnership>
> </PropertyContainer>
> </Template>
>

--------------------------------------------------------------------------
-----------------------------------------------
>
>
> I want to render it in a form (like an editable form with textboxes) and the
> save button at the bottom.
> I am using c# any ideas ..... The above xml can be considered as name
value
> pair so the rendered form would have label for each field (non editable) and
> the corresponding value as text box editable
>
> Thanks
> Ken.
>
>


Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
5
by: ken | last post by:
I have a XML file as below ---------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" standalone="yes"?> ...
27
by: Kim Webb | last post by:
I have a field on a form for project number. I basically want it to be the next available number (ie 06010 then 06011 etc). In the form I create a text box and under control source I put: =!=...
0
by: Jeff Morgan | last post by:
I have an application that runs on ASP.NET. We have been working through performance testing and it appears that at about 40-50 users, I start to get CPU bound. The application is a three form,...
11
by: TD | last post by:
I'm looking for input into my decision to switch to ADO and unbound forms. I get tired of having to block all of the ways a user can unknowingly save a record, like using the PageUp, PageDown keys...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
0
by: Miro | last post by:
Something I have run into using VB Express 2005 with mdi forms. I have not been able to re-create this but I'll let out the information on how I came about fixing this. As it cost me about 4...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.