XMLReader

Discussion in 'Questions (Windows Mobile)' started by Aspire89, Mar 19, 2009.

  1. Aspire89

    Aspire89 Member Licensed User

    there is a xml file:

    Code:
    <Book Xmln="bk" genre="novel">
       <title> my book </ title>
       <price> 
    19.95 </ price>
       <ISBN> 
    1-861003-781-861003-78 </ ISBN>
       <style> hardcover </ style>
    </ Book>
    how to make in XmlnTextBox paste "bk", in GenreTextBox paste "novel", in TitleTextBox paste "my book", etc, thanks.
     
  2. agraham

    agraham Expert Licensed User

    You need to look at the ReadXML Sub in XMLdemo.sbp and understand what it is doing. It is reading and displaying the information that you want.
     
  3. Aspire89

    Aspire89 Member Licensed User

    I watched XMLdemo.sbp, but did not understand :sign0104:, I need to make a specific value is loaded into a TextBox, in the example, all come together and displayed in the msgbox.
     
  4. agraham

    agraham Expert Licensed User

    Play with this simple version of XMLread. Test the element and attribute names for what you want and write the values to your textboxes.
    Code:
    Sub SimpleReadXML
      rdr.Open(AppPath & 
    "\test.xml")   
      rdr.Read
      
    Do
        msg = msg & rdr.NodeType  & 
    ": " rdr.Name & " " & rdr.Value & CRLF
        
    If rdr.AttributeCount > 0 Then
          
    Do While rdr.MoveToNextAttribute
            msg = msg & 
    "AttribName: " & rdr.Name & " AttribValue: " & rdr.Value & CRLF
          
    Loop            
        
    End If
      
    Loop Until rdr.Read = False
     
    Msgbox(msg)
    End Sub
     
  5. Aspire89

    Aspire89 Member Licensed User

    agraham, thanks, simple example of help, I do not think that would be so difficult.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice