Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

comment parser un fichier xsd

3 réponses
Avatar
Helter Skelter
Hello
regardez cette page
http://www.xmlforasp.net/CodeBank/System_Xml_Schema/ParseSchema/ParseXMLSchema.aspx

l'auteur a reussi a faire ce que je cherche depuis plusieurs mois dans ce
tutorial http://www.xmlforasp.net/codeSection.aspx?csID=78
qui ne marche helas qu'avec asp.net 1

Depuis 5 mois je cherche a faire la meme chose en asp.net 2.0.

pouvez vous m'aider ?

3 réponses

Avatar
Helter Skelter
on m'a donné cette solution en asp.net 2.0
malheureusement l'exemple n'est pas aussi bien documenté pour que je puisse
comprendre et apprendre
http://blogs.msdn.com/stan_kitsis/archive/2005/08/06/448572.aspx

si quelqu'un comprend, soyez gentil de m'aider a progresser dans ce domaine





"Helter Skelter" a écrit dans le message de news:
45ca0c3b$0$2162$
Hello
regardez cette page
http://www.xmlforasp.net/CodeBank/System_Xml_Schema/ParseSchema/ParseXMLSchema.aspx

l'auteur a reussi a faire ce que je cherche depuis plusieurs mois dans ce
tutorial http://www.xmlforasp.net/codeSection.aspx?csIDx
qui ne marche helas qu'avec asp.net 1

Depuis 5 mois je cherche a faire la meme chose en asp.net 2.0.

pouvez vous m'aider ?




Avatar
Helter Skelter
voici l'erreur que j'ai en suivant l'exemple du blog
c'est tjrs dans les tests if que j'ai le probleme
merci de m'aider à comprendre


'--------------------
'
Dim schemaSet As XmlSchemaSet = New XmlSchemaSet
schemaSet.Add(Nothing, "schema.xsd")
schemaSet.Compile


'--------------------
'
For Each schema As XmlSchema In ss.Schemas

'------------------------------------------------
' stepping through global complex typesFor Each type As XmlSchemaType In
schema.SchemaTypes.Values
'------------------------------------------------
If (type = XmlSchemaComplexType) Then
'---error "XmlSchemaComplexType" is a type and cannot be used as an
expression.
End If
Next

'------------------------------------------------
' stepping through global elements
'------------------------------------------------
For Each el As XmlSchemaElement In schema.Elements.Values

Next
'------------------------------------------------
' stepping through named groups
'------------------------------------------------
For Each xsa As XmlSchemaAnnotated In schema.Items
If (xsa = XmlSchemaGroup) Then
'-----error "XmlSchemaGroup" is a type and cannot be used as an
expression.

End If
Next


'------------------------------------------
'
Private Sub walkTheParticle(ByVal particle As XmlSchemaParticle)
If (particle = XmlSchemaElement) Then
'-----error "XmlSchemaElement" is a type and cannot be used as an
expression.

Dim elem As XmlSchemaElement = CType(particle,XmlSchemaElement)
' todo: insert your processing code here
If elem.RefName.IsEmpty Then
Dim type As XmlSchemaType =
CType(elem.ElementSchemaType,XmlSchemaType)
If (type = XmlSchemaComplexType) Then
'-----error "XmlSchemaComplexType" is a type and cannot be used as an
expression.

Dim ct As XmlSchemaComplexType =
CType(type,XmlSchemaComplexType)
If ct.QualifiedName.IsEmpty Then
walkTheParticle(ct.ContentTypeParticle)
End If
End If
End If
ElseIf (particle = XmlSchemaGroupBase) Then
'-----error "XmlSchemaGroupBase" is a type and cannot be used as an
expression.

Dim baseParticle As XmlSchemaGroupBase =
CType(particle,XmlSchemaGroupBase)
For Each subParticle As XmlSchemaParticle In baseParticle.Items
walkTheParticle(subParticle)
Next
End If
End Sub

'--------------------------
Private Sub start(ByVal ss As XmlSchemaSet)
For Each schema As XmlSchema In ss.Schemas
For Each type As XmlSchemaType In schema.SchemaTypes.Values
If (type = XmlSchemaComplexType) Then
'-----error "XmlSchemaComplexType" is a type and cannot be used as an
expression.

Dim ct As XmlSchemaComplexType =
CType(type,XmlSchemaComplexType)
walkTheParticle(ct.ContentTypeParticle)
End If
Next
For Each el As XmlSchemaElement In schema.Elements.Values
walkTheParticle(el)
Next
For Each xsa As XmlSchemaAnnotated In schema.Items
If (xsa = XmlSchemaGroup) Then
'-----error "XmlSchemaGroup" is a type and cannot be used as an
expression.
Dim xsg As XmlSchemaGroup = CType(xsa,XmlSchemaGroup)
walkTheParticle(xsg.Particle)
End If
Next
Next
End Sub


"Helter Skelter" a écrit dans le message de news:
45caf8db$0$4944$
on m'a donné cette solution en asp.net 2.0
malheureusement l'exemple n'est pas aussi bien documenté pour que je
puisse comprendre et apprendre
http://blogs.msdn.com/stan_kitsis/archive/2005/08/06/448572.aspx

si quelqu'un comprend, soyez gentil de m'aider a progresser dans ce
domaine





"Helter Skelter" a écrit dans le message de news:
45ca0c3b$0$2162$
Hello
regardez cette page
http://www.xmlforasp.net/CodeBank/System_Xml_Schema/ParseSchema/ParseXMLSchema.aspx

l'auteur a reussi a faire ce que je cherche depuis plusieurs mois dans ce
tutorial http://www.xmlforasp.net/codeSection.aspx?csIDx
qui ne marche helas qu'avec asp.net 1

Depuis 5 mois je cherche a faire la meme chose en asp.net 2.0.

pouvez vous m'aider ?









Avatar
Paul Bacelar
Relisez bien l'exemple.
Vous avez remplacé le mot réservé "is" par l'opérateur "=".
Je pense que toutes les erreurs partiront avec le remplacement de "=" par
"is" ;-)
--
Paul Bacelar
MVP VC++


"Helter Skelter" wrote in message
news:45cb150f$0$5937$
voici l'erreur que j'ai en suivant l'exemple du blog
c'est tjrs dans les tests if que j'ai le probleme
merci de m'aider à comprendre


'--------------------
'
Dim schemaSet As XmlSchemaSet = New XmlSchemaSet
schemaSet.Add(Nothing, "schema.xsd")
schemaSet.Compile


'--------------------
'
For Each schema As XmlSchema In ss.Schemas

'------------------------------------------------
' stepping through global complex typesFor Each type As XmlSchemaType In
schema.SchemaTypes.Values
'------------------------------------------------
If (type = XmlSchemaComplexType) Then
'---error "XmlSchemaComplexType" is a type and cannot be used as
an expression.
End If
Next

'------------------------------------------------
' stepping through global elements
'------------------------------------------------
For Each el As XmlSchemaElement In schema.Elements.Values

Next
'------------------------------------------------
' stepping through named groups
'------------------------------------------------
For Each xsa As XmlSchemaAnnotated In schema.Items
If (xsa = XmlSchemaGroup) Then
'-----error "XmlSchemaGroup" is a type and cannot be used as an
expression.

End If
Next


'------------------------------------------
'
Private Sub walkTheParticle(ByVal particle As XmlSchemaParticle)
If (particle = XmlSchemaElement) Then
'-----error "XmlSchemaElement" is a type and cannot be used as an
expression.

Dim elem As XmlSchemaElement = CType(particle,XmlSchemaElement)
' todo: insert your processing code here
If elem.RefName.IsEmpty Then
Dim type As XmlSchemaType =
CType(elem.ElementSchemaType,XmlSchemaType)
If (type = XmlSchemaComplexType) Then
'-----error "XmlSchemaComplexType" is a type and cannot be used as an
expression.

Dim ct As XmlSchemaComplexType =
CType(type,XmlSchemaComplexType)
If ct.QualifiedName.IsEmpty Then
walkTheParticle(ct.ContentTypeParticle)
End If
End If
End If
ElseIf (particle = XmlSchemaGroupBase) Then
'-----error "XmlSchemaGroupBase" is a type and cannot be used as an
expression.

Dim baseParticle As XmlSchemaGroupBase =
CType(particle,XmlSchemaGroupBase)
For Each subParticle As XmlSchemaParticle In baseParticle.Items
walkTheParticle(subParticle)
Next
End If
End Sub

'--------------------------
Private Sub start(ByVal ss As XmlSchemaSet)
For Each schema As XmlSchema In ss.Schemas
For Each type As XmlSchemaType In schema.SchemaTypes.Values
If (type = XmlSchemaComplexType) Then
'-----error "XmlSchemaComplexType" is a type and cannot be used as an
expression.

Dim ct As XmlSchemaComplexType =
CType(type,XmlSchemaComplexType)
walkTheParticle(ct.ContentTypeParticle)
End If
Next
For Each el As XmlSchemaElement In schema.Elements.Values
walkTheParticle(el)
Next
For Each xsa As XmlSchemaAnnotated In schema.Items
If (xsa = XmlSchemaGroup) Then
'-----error "XmlSchemaGroup" is a type and cannot be used as an
expression.
Dim xsg As XmlSchemaGroup = CType(xsa,XmlSchemaGroup)
walkTheParticle(xsg.Particle)
End If
Next
Next
End Sub


"Helter Skelter" a écrit dans le message de news:
45caf8db$0$4944$
on m'a donné cette solution en asp.net 2.0
malheureusement l'exemple n'est pas aussi bien documenté pour que je
puisse comprendre et apprendre
http://blogs.msdn.com/stan_kitsis/archive/2005/08/06/448572.aspx

si quelqu'un comprend, soyez gentil de m'aider a progresser dans ce
domaine





"Helter Skelter" a écrit dans le message de news:
45ca0c3b$0$2162$
Hello
regardez cette page
http://www.xmlforasp.net/CodeBank/System_Xml_Schema/ParseSchema/ParseXMLSchema.aspx

l'auteur a reussi a faire ce que je cherche depuis plusieurs mois dans
ce tutorial http://www.xmlforasp.net/codeSection.aspx?csIDx
qui ne marche helas qu'avec asp.net 1

Depuis 5 mois je cherche a faire la meme chose en asp.net 2.0.

pouvez vous m'aider ?