evans

evans

  • NA
  • 1
  • 0

XML ATTRIBUTE + SQL SERVER

Oct 21 2008 1:06 PM

Hi, I have an xml file below and will need to use e.g. code="1.101" to retrieve some data from the database.  I am trying to use code="1.101" as an id to retrieve a row from the database.  This xml attribute code="1.101" is going to be unique like every row in the database.  Then I will need to populate a label or text box with that row from the database.  I haven't had much luck finding anything concrete.  I was trying to use XPath to identify the particular node/attribute and then use that to reference the row from the database and finally populating the text box with the data from the row in database but most importantly NOT populating it with the data from the xml file.  But if anyone has any alternatives or a better approach I will be very greatefull for any help.  Thanks in advance!

 

<?xml version="1.0" encoding="utf-16"?>

<categoryXML>

<node Title="TITLE 11 - Bankruptcy Code" Url="http://www.yahoo.com">

<node Title="CHAPTER 1 - GENERAL PROVISIONS" Url="http://www.google.com">

<node Title="§ 101. Definitions" code="1.101" Url="http://www.ny1.com/weather"></node>

<node Title="§ 102. Rules of construction" code="1.102" Url="http://www.ask.com"></node>