elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


  Mostrar Mensajes
Páginas: 1 ... 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21] 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 ... 69
201  Programación / .NET (C#, VB.NET, ASP) / Re: Problema al leer un archivo XML (Solucionado) en: 12 Julio 2010, 15:31 pm
es Cierto...
Pensaba hacerlos recursivosn inclusive.
pero este no es el unico archivo que se va  a leer y hay otros muchisimos mas grandes, decidi que era mejor usar for each.
202  Programación / .NET (C#, VB.NET, ASP) / Re: Problema al leer un archivo XML (Solucionado) en: 11 Julio 2010, 15:50 pm
Buenas.... ya arregle el problema.

Para aquellos que experimentan talves el mismo problema les dejo la solucion

Mi problema era k no podia leer los SinlgeNode.

Cambie el code:

Código
  1. Dim strNode() As String = Split(Node.Value, " ")

POR:
Código
  1. Dim strNode() As String = Split(Node.FirstChild.Value, " ")

Espero que a alguien tambien le sirva esta solucion
203  Programación / .NET (C#, VB.NET, ASP) / Problema al leer un archivo XML (Solucionado) en: 9 Julio 2010, 21:27 pm
Buenas, buneo antes habia hecho un post de como leer este archivo..
resulta que ya lo se leer.
pero me presenta un problema cuando desea leer los keywords.
dejo el code y el archivo xml como lo tengo

Archivo XML
Código
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Languaje>
  3. <Scopes>
  4. <Scope start="Namespace" End="End Namespace"/>
  5. <Scope start="#Region" End="#End Region"/>
  6. <Scope start="Class" End="End Class"/>
  7. <Scope start="Module" End="End Module"/>
  8. <Scope start="Interface" End="End Iterface"/>
  9. <Scope start="Sub" End="End Sub"/>
  10. <Scope start="Function" End="End Function"/>
  11. <Scope start="Property" End="End Property"/>
  12. <Scope start="Get" End="End Get"/>
  13. <Scope start="Set" End="End Set"/>
  14. </Scopes>
  15. <Coments>
  16. <Coment start="'" End="\n"/>
  17. </Coments>
  18. <Constants>
  19. <Constant text="VbCr"/>
  20. <Constant text="VbCrLf"/>
  21. <Constant text="VbLf"/>
  22. </Constants>
  23. <Operators>
  24. <Pattern Id="." />
  25. <Pattern Id="!" />
  26. <Pattern Id=":" />
  27. <Pattern Id="^" />
  28. <Pattern Id="*" />
  29. <Pattern Id="/" />
  30. <Pattern Id="+" />
  31. <Pattern Id="-" />
  32. <Pattern Id="=" />
  33. <Pattern Id=";" />
  34. <Pattern Id="|" />
  35. <Pattern Id="\" />
  36. <Pattern Id="&gt;" />
  37. <Pattern Id="&lt;" />
  38. </Operators>
  39. <Keys></Keys>
  40. <Keywords>AddHandler AddressOf Alias And AndAlso Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Currency Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit Explicit False Finally For Friend Function Get GetType GoTo Global Handles If Imports In Inherits Integer Interface Implements Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor</Keywords>
  41. </Languaje>
  42.  
  43.  


Codigo que uso para leerlo
Código
  1.        ''' <summary>
  2.        ''' Leer todas palabras claves del lenguaje
  3.        ''' </summary>
  4.        Public Sub LoadSintax(ByVal pathSystem As String, ByVal nomLanguaje As String)
  5.            Dim Xml As XmlDocument
  6.            Dim NodeList As XmlNodeList
  7.            Dim Node As XmlNode
  8.            Try
  9.                Xml = New XmlDocument()
  10.                Xml.Load(pathSystem & "\" & nomLanguaje & ".xml")                   'Cargar el archivo XML con la info del lenguaje
  11.                NodeList = Xml.SelectNodes("/Languaje/Scopes/Scope")                'Cargar los nodos a leer
  12.                For Each Node In NodeList                                           'repetir hasta terminar todos los nodos
  13.                    With Node.Attributes
  14.                        sintax.StartMethod.Add(.GetNamedItem("start").Value)
  15.                        sintax.EndMethod.Add(.GetNamedItem("End").Value)
  16.                    End With
  17.                Next
  18.                NodeList = Xml.SelectNodes("/Languaje/Coments/Coment")                  'Cargar el sistema de comentarios
  19.                For Each Node In NodeList
  20.                    With Node.Attributes
  21.                        sintax.startComent.Add(.GetNamedItem("start").Value)
  22.                        sintax.endComent.Add(.GetNamedItem("End").Value)
  23.                    End With
  24.                Next
  25.                NodeList = Xml.SelectNodes("/Languaje/Constants/Constant")              'Cargar las constantes de la aplicacion
  26.                For Each Node In NodeList
  27.                    With Node.Attributes
  28.                        sintax.Constants.Add(.GetNamedItem("text").Value)
  29.                    End With
  30.                Next
  31.                NodeList = Xml.SelectNodes("/Languaje/Operators/Pattern")               'Cargar los operadores del lenguaje
  32.                For Each Node In NodeList
  33.                    With Node.Attributes
  34.                        sintax.Operators.Add(.GetNamedItem("Id").Value)
  35.                    End With
  36.                Next
  37.                Node = Xml.SelectSingleNode("/Languaje/Keywords")                       'Cargar la sintaxis de lenguaje
  38.                Dim strNode() As String = Split(Node.Value, " ")
  39.                For idx = 0 To strNode.Length - 1
  40.                    sintax.Sintaxis.Add(strNode(idx))
  41.                Next
  42.                Node = Xml.SelectSingleNode("/Languaje/Keys")                           'Cargar las palabras clave del lenguaje
  43.                strNode = Split(Node.Value, " ")
  44.                For idx = 0 To strNode.Length - 1
  45.                    sintax.KeySintax.Add(strNode(idx))
  46.                Next
  47.            Catch ex As Exception
  48.                MsgBox(ex.GetType.ToString & vbNewLine & ex.Message.ToString, vbCritical, "ERROR!")
  49.            End Try
  50.        End Sub
  51.  


que tengo mal o que tengo que cambiar para que me lea los keyword y los keys

204  Programación / .NET (C#, VB.NET, ASP) / Re: Leer archivo xml.... en: 3 Julio 2010, 00:16 am
Muchas gracias por la ayuda a todos!!! he consultado los temas y me sirvieron de mucho... gracias!!!
205  Programación / .NET (C#, VB.NET, ASP) / Re: Leer archivo xml.... en: 29 Junio 2010, 15:54 pm
Me podrian dar un ejemplo de code!!! gracias!!!
206  Programación / .NET (C#, VB.NET, ASP) / Re: Leer archivo xml.... en: 29 Junio 2010, 05:30 am
Código:
Yo he usado XmlTextReader para una aplicacion anterior!!!
Pero lo k no se es como leer el sistema de arriba
[code=xml]<Scope start="Namespace" End="End Namespace"/>
como hago para almacenar el start y el end???
De ante mano agradezco toda la ayuda posible[/code]
207  Programación / .NET (C#, VB.NET, ASP) / Leer archivo xml.... en: 27 Junio 2010, 16:41 pm
Buenas...
bueno tengo este archivo xml

Código
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Language Name="VB.NET">
  3. <Scope start="Namespace" End="End Namespace"/>
  4. <Scope start="#Region" End="#End Region"/>
  5. <Scope start="Class" End="End Class"/>
  6. <Scope start="Interface" End="End + (Iterface)"/>
  7. <Scope start="Sub" End="End Sub"/>
  8. <Scope start="Function" End="End Function"/>
  9. <Scope start="Property" End="End Property"/>
  10. <Scope start="Get" End="End Get"/>
  11. <Scope start="Set" End="End Set"/>
  12. <Coment start="'" End=""/>
  13. <Keywords>AddHandler AddressOf Alias And AndAlso Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType</Keywords>
  14. <Constants>VbCrLf VbCr VbLf</Constants>
  15. <Operators>
  16. <Pattern Text="." />
  17. <Pattern Text="!" />
  18. <Pattern Text=":" />
  19. <Pattern Text="^" />
  20. <Pattern Text="*" />
  21. <Pattern Text="/" />
  22. <Pattern Text="+" />
  23. <Pattern Text="-" />
  24. <Pattern Text="=" />
  25. <Pattern Text=";" />
  26. <Pattern Text="|" />
  27. <Pattern Text="\" />
  28. <Pattern Text="&gt;" />
  29. <Pattern Text="&lt;" />
  30. </Operators>
  31. </Language>
  32.  


Mi pregunta es Como lo leo???
Lo mas importante es la parte de arriba los scope
Les agrezco mucho toda la ayuda disponible
208  Programación / .NET (C#, VB.NET, ASP) / Re: Efecto DragDrop y uso (Tema modificado: dragdrop) en: 8 Junio 2010, 22:31 pm
Alguna ayuda de la modificacion????
209  Programación / .NET (C#, VB.NET, ASP) / Re: DragDrop en: 7 Junio 2010, 20:50 pm
Gracias me sirvio de mucho
210  Programación / .NET (C#, VB.NET, ASP) / Efecto DragDrop y uso (Tema modificado: dragdrop) en: 7 Junio 2010, 20:25 pm
Bueno D4N93R me dio una respuesta que me sirvio de mucho para el arrastre de elementos a otros...

pero resulta y acontece lo siguiente:
Estoy realizando un control de deslizamiento tipo reproductor... con un picture. y quiero que cuando se le de click (mouseDown) este me permita arrastrarlo hasta cierto punto y se vea el efecto de arraste del control...
Como puedo hacer esto??? he buscado mucho y no encuentro algo asi... intente inventando codigo pero no me da nada
porfa alguna ayuda. un pedazo de code. se que se tiene que habilitar el myBase.AllowDrop pero no se mas....

De ante mano agradezco toda la ayuda prestada...
Páginas: 1 ... 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21] 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 ... 69
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines