Click here to Skip to main content
       

XML / XSL

 
AnswerRe: Layout question PinmemberZaf Khan29-Nov-12 8:27 
QuestionHelp with XSLT PinmemberMissMac18-Sep-12 7:33 
AnswerRe: Help with XSLT PinmemberMissMac18-Sep-12 7:57 
QuestionXML , XSL and JavaScript [modified] Pinmemberrajats8716-Sep-12 20:57 
AnswerRe: XML , XSL and JavaScript Pinmemberh4ckjr17-Sep-12 15:38 
GeneralRe: XML , XSL and JavaScript Pinmemberrajats8718-Sep-12 2:07 
QuestionXSL Output PinmemberSta_Horse12-Sep-12 20:21 
QuestionHow to know last autoincrement id in xml file PinmemberNareshmnt10-Aug-12 21:48 
Hi,
below my xml file
- <CateringOrders>
- <orders>
  <userid>1</userid> 
  <orderid>DAK081012093349</orderid> 
  <Menu>Appetizers</Menu> 
  <MenuType>Veg</MenuType> 
  <Region>South-Indian</Region> 
  <Items>Vankaya Bajji</Items> 
  <Tray>Half Tray</Tray> 
  <Qty>12</Qty> 
  </orders>
- <orders>
  <userid>2</userid> 
  <orderid>DAK081012093811</orderid> 
  <Menu>Appetizers</Menu> 
  <MenuType>Veg</MenuType> 
  <Region>South-Indian</Region> 
  <Items>Aloo Vada</Items> 
  <Tray>Half Tray</Tray> 
  <Qty>18</Qty> 
  </orders>
- <orders>
  <userid>3</userid> 
  <orderid>DAK081012093811</orderid> 
  <Menu>Appetizers</Menu> 
  <MenuType>Veg</MenuType> 
  <Region>South-Indian</Region> 
  <Items>Vankaya Bajji</Items> 
  <Tray>Half Tray</Tray> 
  <Qty>20</Qty> 
  </orders>
  </CateringOrders>
below auto increment code
Dim xmldoc As New XmlDocument()
           Dim Str_XmlFile As String = ""
           Str_XmlFile = Server.MapPath("~/CatOrders/") & "CateringOrder.xml"
 
           If Not File.Exists(Str_XmlFile) Then
               Dim StrWriter As New XmlTextWriter(Str_XmlFile, System.Text.Encoding.UTF8)
               StrWriter.WriteStartDocument(True)
               StrWriter.WriteStartElement("CateringOrders")
               StrWriter.WriteEndElement()
               StrWriter.Close()
 
           End If
           xmldoc.Load(Str_XmlFile)
 
           Dim parentelement As XmlElement = xmldoc.CreateElement("orders")
           Dim nodes As XmlNodeList = xmldoc.SelectNodes("//orders/userid")
 
           Dim nNodeID As Integer = nodes.Count
           nNodeID += 1
           Dim userid As XmlElement = xmldoc.CreateElement("userid")
           userid.InnerText = nNodeID
           Dim orderid As XmlElement = xmldoc.CreateElement("orderid")
           orderid.InnerText = Session("orderid")
 

 
please let me know how to get last unique id
AnswerRe: How to know last autoincrement id in xml file PinmemberChristopher Drake12-Sep-12 11:17 
QuestionXSD.EXE array, would like list Pinmemberkalkwarf24-Jul-12 6:30 
AnswerRe: XSD.EXE array, would like list PinmemberBernhard Hiller24-Jul-12 21:33 
GeneralRe: XSD.EXE array, would like list Pinmemberkalkwarf25-Jul-12 5:44 
GeneralRe: XSD.EXE array, would like list Pinmemberjschell25-Jul-12 7:14 
GeneralRe: XSD.EXE array, would like list PinmemberBernhard Hiller25-Jul-12 20:41 
AnswerRe: XSD.EXE array, would like list Pinmemberjschell25-Jul-12 7:21 
AnswerRe: XSD.EXE array, would like list Pinmemberjinzai17-Jul-14 13:26 
GeneralRe: XSD.EXE array, would like list Pinmemberkalkwarf18-Jul-14 4:42 
GeneralXSLT to transform one XML file to another and display as HTML PinmemberGStar99921-Jul-12 1:50 
Generalbest current book with strong coverage of XSLT ? PinmemberBillWoodruff5-Jul-12 14:16 
AnswerMessage Removed PinmemberLiveFreeCodeHard20-Jul-12 11:29 
GeneralRe: best current book with strong coverage of XSLT ? PinmemberBillWoodruff20-Jul-12 15:18 
Questionregasxml error PingroupMember 913688818-Jun-12 6:51 
QuestionXml Schema [modified] PinmemberVijjuuu.14-Jun-12 7:02 
AnswerRe: Xml Schema PinmvpSandeep Mewara14-Jun-12 10:49 
GeneralRe: Xml Schema PinmemberVijjuuu.14-Jun-12 18:49 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 27 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid