如何从Exist数据库加载xml文件?

时间:2022-04-08 11:15:06

i've been trying to load xml files that I have saved in the exist database so i can view it on the web, but nothing works could anyone tell me how to do that please . thanks

我一直在尝试加载已保存在已存在的数据库中的xml文件,以便我可以在网上查看,但没有任何作品可以让任何人告诉我该怎么做。谢谢

this is the Xml document that im trying to get from the exist database .

这是我试图从现有数据库中获取的Xml文档。

    <usanavy>
<officer_rank>
<officers_titles>
<ensign>ENS</ensign>
<lieutenant_junior>LTJG</lieutenant_junior>
<lieutenant>LT</lieutenant>
<lieutenant_commander>LCDR</lieutenant_commander>
<commander>CDR</commander>
<captain>CAPT</captain>
<rear_admiral_lowerhalf>RDML</rear_admiral_lowerhalf>
<rear_admiral>RDM</rear_admiral>
<vice_admiral>VADM</vice_admiral>
<admiral>ADM</admiral>
<fleet_admiral>FADM</fleet_admiral>
</officers_titles>
<officers_pay_grade>
<ensign>0 to 1</ensign>
<lieutenant_junior>0 to 2</lieutenant_junior>
<lieutenant>0 to 3</lieutenant>
<lieutenant_commander>0 to 4</lieutenant_commander>
<commander>0 to 5</commander>
<captain>0 to 6</captain>
<rear_admiral_lowerhalf>0 to 7</rear_admiral_lowerhalf>
<rear_admiral>0 to 8</rear_admiral>
<vice_admiral>0 to 9</vice_admiral>
<admiral>0 to 10</admiral>
<fleet_admiral>special</fleet_admiral>
</officers_pay_grade>
</officer_rank>
<commissioned_warrant_officers>
<chief_warrant_officer_two>w-2</chief_warrant_officer_two>
<chief_warrant_officer_three>w-3</chief_warrant_officer_three>
<chief_warrant_officer_four>w-4</chief_warrant_officer_four>
<chief_warrant_officer_five>w-5</chief_warrant_officer_five>
</commissioned_warrant_officers>
<non_commissioned_warrant_officers>
<seaman_recruit>E-1</seaman_recruit>
<seaman_apprentice>E-2</seaman_apprentice>
<seaman>E-3</seaman>
<petty_officer_third_class>E-4</petty_officer_third_class>
<petty_officer_second_class>E-5</petty_officer_second_class>
<petty_officer_first_class>E-6</petty_officer_first_class>
<chief_petty_officer>E-7</chief_petty_officer>
<senior_chief_petty_officer>E-8</senior_chief_petty_officer>
<master_chief_petty_officer>E-8</master_chief_petty_officer>
<command_master_chief_petty_officer>E-9</command_master_chief_petty_officer>
<fleet_master_chief_petty_officer>E-9</fleet_master_chief_petty_officer>
<master_chief_petty_officer_of_navy>E-9</master_chief_petty_officer_of_navy>
</non_commissioned_warrant_officers>
<ships>
<uss_abraham type="aircraft carrier">carrier</uss_abraham>
<uss_alabama type="missle submarine">Ballistic missile submarine</uss_alabama>
<uss_alaska type="missle submarine">Ballistic missle submarine</uss_alaska>
<uss_warrior>mine counterneasures</uss_warrior>
<uss_virginia>attack submarine</uss_virginia>
<uss_wasap>assault ship</uss_wasap>
<uss_tortuga>dock lanfing ship</uss_tortuga>
</ships>
</usanavy>

1 个解决方案

#1


1  

The xml files can be seen directly via URL in browser. e.x. http://localhost/exist/servlet/db/the-path-of-your-xml-file.xml

可以通过浏览器中的URL直接查看xml文件。 e.x. HTTP://localhost/exist/servlet/db/the-path-of-your-xml-file.xml

And if you want to use it in the page of your website, just use javascript with AJAX.

如果你想在你的网站页面中使用它,只需使用JavaScript与AJAX。

#1


1  

The xml files can be seen directly via URL in browser. e.x. http://localhost/exist/servlet/db/the-path-of-your-xml-file.xml

可以通过浏览器中的URL直接查看xml文件。 e.x. HTTP://localhost/exist/servlet/db/the-path-of-your-xml-file.xml

And if you want to use it in the page of your website, just use javascript with AJAX.

如果你想在你的网站页面中使用它,只需使用JavaScript与AJAX。