Parsing DOM

2002-05-03 Thread Joan Pujol Espinar
Hi,

I want to parse a XML Document  with DOM.
I know well the format of the document, and I have a XML schema for it.
I want to get some dispersed nested elements in arbitrally order. 

I have been examining the DOM API and I can't find a comfortable way to do it.



 
   
   
   
   
   
  


For example, if I know the format, and I want to get the atri element of D. 
What's the better way to get it?

Bye,



I knowThe format of the document is 

---
Joan Pujol Espinar
PTS Sistemes Departament IMA 
Universitat de Girona


-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validation error with Xerces131... bug??.

2001-10-29 Thread Joan Pujol Espinar
Quoting Thakur Thribhuvan <[EMAIL PROTECTED]>:

Hi Thakur,

You have some problems with schema design. The Schema you write isn't valid.
You can't use the attribute base directly in a complexType.

When you want to create a complexType from a simple Type you have to use:


  

  
  


Also I see that you declare the Schema namespace to xsd prefix. But why you 
don't use the prefix xsd when you declare the Types and elements?
It's correct? I think that you must put the schema namespace if you want to do 
it.

Bye,

> Hi, 
> I have written a Schema that contains couple of elements and an attribute.
> When I validate it using one the samples(dom.DOMCount with -v option) it
> gives me this error.
> 
> java dom.DOMCount -v account.xml
>[Error] account.xml:7:51: The content of element type "anu:ProductID"
> must match "EMPTY".
>account.xml: 1362 ms (4 elems, 4 attrs, 11 spaces, 12 chars)
> 
>   I guess the parser seems to assume that the content type as empty for
> ProductID(one of the elements) when it should be elementOnly which is the
> default. I am enclosing the xml instance file and the schema. Any pointers
> would be appreciated.
> 
> 
>  xmlns:xsd='http://www.w3.org/2000/10/XMLSchema'
> xmlns:anu='anutech.com'>
> 
>
>  
>  
>   
>
> 
>  
>   
> 
> 
> 
>   
>  
> 
> 
>  
>  
> 
> 
> 
> 
> 
>   xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";
> 
>  xsi:schemaLocation='anutech.com account.xsd'>
> 123456789 
> 
> 99
>  
> A  
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---
Joan Pujol Espinar
PTS Sistemes Departament IMA 
Universitat de Girona


-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]