'Cannot find the declaration of 'p:Peminjaman'
I'm trying to do simple xml. but it shows cvc-elt.1.a: Cannot find the declaration of element 'p:Peminjaman' as an error.
<?xml version="1.0" ?>
<p:Peminjaman xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="namespace tes.xsd" xmlns:p="namespace">
<p:PinjamanDetail>
<p:Buku>
<p:Judul>Widget </p:Judul>
<p:Jumlah>1</p:Jumlah>
<p:Category>Programming</p:Category>
</p:Buku>
</p:PinjamanDetail>
<p:CustomerDetail>
<p:Nama>James</p:Nama>
<p:Alamat>
<p:Line1>15 Some Road</p:Line1>
<p:Line2>SomeTown</p:Line2>
</p:Alamat>
</p:CustomerDetail>
</p:Peminjaman>
here is the code, please help since I really don't know what's wrong :D
Solution 1:[1]
You didn't post your XSD, but if you're looking for guesses:
tes.xsdlackstargetNamespace="namespace"on thexs:schemaelement.Peminjamanis not defined as a top-level element intes.xsd.tes.xsdis not well-formed or invalid.tes.xsdcannot be found.
If you'd like less guessing and more definitive answering, post a minimum, complete viable example of your issue, including your XSD.
See also
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
