Click here to Skip to main content
15,916,702 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: Encrypting and decrypting xml files Pin
Scott Dorman11-Oct-07 4:48
professionalScott Dorman11-Oct-07 4:48 
Questionserialize colors and fonts in XML Pin
urbane.tiger9-Oct-07 21:09
urbane.tiger9-Oct-07 21:09 
AnswerRe: serialize colors and fonts in XML Pin
led mike10-Oct-07 4:36
led mike10-Oct-07 4:36 
GeneralRe: serialize colors and fonts in XML Pin
urbane.tiger10-Oct-07 23:39
urbane.tiger10-Oct-07 23:39 
GeneralRe: serialize colors and fonts in XML Pin
led mike11-Oct-07 5:41
led mike11-Oct-07 5:41 
GeneralRe: serialize colors and fonts in XML Pin
urbane.tiger11-Oct-07 18:28
urbane.tiger11-Oct-07 18:28 
GeneralRe: serialize colors and fonts in XML Pin
led mike12-Oct-07 4:10
led mike12-Oct-07 4:10 
GeneralRe: serialize colors and fonts in XML Pin
urbane.tiger14-Oct-07 19:30
urbane.tiger14-Oct-07 19:30 
QuestionRegarding xpath expressions Pin
anu818-Oct-07 23:48
anu818-Oct-07 23:48 
AnswerRe: Regarding xpath expressions Pin
anu819-Oct-07 0:31
anu819-Oct-07 0:31 
QuestionWord XML/XSLT Pin
Glenn E. Lanier II8-Oct-07 12:44
Glenn E. Lanier II8-Oct-07 12:44 
QuestionFormula to calculate Equal Monthly Payments Pin
Vtoria8-Oct-07 7:35
Vtoria8-Oct-07 7:35 
AnswerRe: Formula to calculate Equal Monthly Payments Pin
Howard Richards22-Oct-07 5:16
Howard Richards22-Oct-07 5:16 
QuestionSimple Filter Question Pin
Glenn E. Lanier II8-Oct-07 4:35
Glenn E. Lanier II8-Oct-07 4:35 
I am venturing into the .NET XML world and have already run into a problem.

I have some very simple (I think) XML that defines several loan rate values, with attributes indicating the min and max amount for the loan:

<code>
<LoanInformation>
<LoanRates>
<Loan MinValue="001000.00" MaxValue="004999.99">
<Margin>10.25</Margin>
<Floor>14.75</Floor>
</Loan>
<Loan MinValue="005000.00" MaxValue="009999.99">
<Margin>5.25</Margin>
<Floor>9.75</Floor>
</Loan>
</LoanRates>
</LoanInformation>
</code>

So, a loan for $2500.00 should have a margin of 10.25/floor of 14.75, while a loan of $7500.00 should have a margin of 5.25/floor of 9.75.

I want to access these values in my C# code to calculate the rate/payment, but am stuck.

<code>
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Server.MapPath(@"~\App_Data\LoanInformation.xml"));
string xPath = string.Format("//LoanRates/Loan[@MinValue >= '{0:000000.00}' and @MaxValue <= '{0:000000.00}']", plcdata.LoanAmount);
XmlNode node = xmlDoc.SelectSingleNode(xPath);
</code>

node seems to always be null, unless I remove the 'and @Max ..' clause. I added the leading zero's in case text vs. number comparison was causing a problem.

Any pointers would be greatly appreciated.

--G

-- modified to "ignore HTML tags"
AnswerRe: Simple Filter Question Pin
pmarfleet8-Oct-07 10:03
pmarfleet8-Oct-07 10:03 
GeneralRe: Simple Filter Question Pin
Glenn E. Lanier II8-Oct-07 10:09
Glenn E. Lanier II8-Oct-07 10:09 
QuestionXSL creation Problem Pin
Vanamaindia3-Oct-07 23:45
Vanamaindia3-Oct-07 23:45 
AnswerRe: XSL creation Problem Pin
Not Active4-Oct-07 2:22
mentorNot Active4-Oct-07 2:22 
Questionerror when adding web reference Pin
vijayaBTS3-Oct-07 21:15
vijayaBTS3-Oct-07 21:15 
QuestionSchema with Entity -- Validating Error Pin
xfun5563-Oct-07 3:08
xfun5563-Oct-07 3:08 
Questionxml serializer Pin
mukkanti0073-Oct-07 2:05
mukkanti0073-Oct-07 2:05 
AnswerRe: xml serializer Pin
Ilya Verbitskiy3-Oct-07 4:48
Ilya Verbitskiy3-Oct-07 4:48 
AnswerRe: xml serializer Pin
Dave Kreskowiak3-Oct-07 5:03
mveDave Kreskowiak3-Oct-07 5:03 
QuestionImage display problem Pin
SUDHAKAR PALLAM2-Oct-07 18:34
SUDHAKAR PALLAM2-Oct-07 18:34 
Questionsimple XPATH help Pin
eggie52-Oct-07 9:04
eggie52-Oct-07 9:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.