-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
147 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
misc/xml-to-record-converter/src/test/resources/ballerina/sample_35.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type Book record { | ||
string title; | ||
string author; | ||
int year; | ||
decimal price; | ||
}; | ||
|
||
@xmldata:Name {value: "bookstore"} | ||
type Bookstore record { | ||
Book book; | ||
}; |
22 changes: 22 additions & 0 deletions
22
misc/xml-to-record-converter/src/test/resources/ballerina/sample_36.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
type Title record { | ||
string __text; | ||
string lang; | ||
}; | ||
|
||
type Price record { | ||
decimal __text; | ||
string currency; | ||
}; | ||
|
||
type Book record { | ||
Title title; | ||
string author; | ||
int year; | ||
Price price; | ||
string category; | ||
}; | ||
|
||
@xmldata:Name {value: "bookstore"} | ||
type Bookstore record { | ||
Book book; | ||
}; |
37 changes: 37 additions & 0 deletions
37
misc/xml-to-record-converter/src/test/resources/ballerina/sample_37.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
type Book_Title record { | ||
string __text; | ||
string edition; | ||
string format; | ||
string lang; | ||
string pages; | ||
}; | ||
|
||
type Book_Price record { | ||
decimal __text; | ||
string currency; | ||
}; | ||
|
||
type Book_Book record { | ||
Book_Title title; | ||
string author; | ||
string publisher; | ||
string publish_date; | ||
int isbn; | ||
Book_Price price; | ||
string available; | ||
string id; | ||
string shelf; | ||
}; | ||
|
||
type Books record { | ||
string genre; | ||
Book_Book book; | ||
}; | ||
|
||
@xmldata:Name {value: "library"} | ||
type Library record { | ||
Books books; | ||
string established; | ||
string genre; | ||
string location; | ||
}; |
8 changes: 8 additions & 0 deletions
8
misc/xml-to-record-converter/src/test/resources/xml/sample_35.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<bookstore> | ||
<book category="children"> | ||
<title lang="en">Harry Potter</title> | ||
<author>J.K. Rowling</author> | ||
<year>2005</year> | ||
<price currency="USD">29.99</price> | ||
</book> | ||
</bookstore> |
13 changes: 13 additions & 0 deletions
13
misc/xml-to-record-converter/src/test/resources/xml/sample_36.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<library xmlns:book="http://example.com/books" genre="Programming" location="City Library" established="1985"> | ||
<books> | ||
<genre>Programming</genre> | ||
<book:book id="1" shelf="A3" available="true"> | ||
<book:title lang="en" edition="1st" pages="500" format="hardcover">XML Developer's Guide</book:title> | ||
<book:author>John Doe</book:author> | ||
<book:publisher>Tech Press</book:publisher> | ||
<book:publish_date>2000-10-01</book:publish_date> | ||
<book:isbn>1234567890</book:isbn> | ||
<book:price currency="USD">49.99</book:price> | ||
</book:book> | ||
</books> | ||
</library> |