Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML namespaces #8

Closed
Charnelx opened this issue Sep 12, 2016 · 4 comments
Closed

XML namespaces #8

Charnelx opened this issue Sep 12, 2016 · 4 comments

Comments

@Charnelx
Copy link

Charnelx commented Sep 12, 2016

Hi.

Does this module actually have namespaces support?

For example i have such XML file with custom namespace prefix v8msg:

<?xml version="1.0" encoding="UTF-8"?>
<v8msg:Message xmlns:v8msg="http://v8.1c.ru/messages">
  <v8msg:Header>
    <v8msg:ExchangePlan>МобТорговля</v8msg:ExchangePlan>
    <v8msg:To>Моб1</v8msg:To>
    <v8msg:From>ЦУ</v8msg:From>
    <v8msg:MessageNo>83</v8msg:MessageNo>
    <v8msg:ReceivedNo>0</v8msg:ReceivedNo>
  </v8msg:Header>
  <v8msg:Body>
    <CatalogObject.ТипыЦенНоменклатуры>
      <Ref>ec986086-5ba8-11e4-ae81-74f06d6aab21</Ref>
      <DeletionMark>false</DeletionMark>
      <Code>000000001</Code>
      <Description>Роздріб</Description>
    </CatalogObject.ТипыЦенНоменклатуры>
  </v8msg:Body>
</v8msg:Message>

After conversion XML - to - JSON and backwards i get this:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Message xmlns:ns0="http://v8.1c.ru/messages>
  <ns0:Header>
    <ns0:ExchangePlan>МобТорговля</v8msg:ExchangePlan>
    <ns0:To>Моб1</v8msg:To>
    <ns0:From>ЦУ</v8msg:From>
    <ns0:MessageNo>83</v8msg:MessageNo>
    <ns0:ReceivedNo>0</v8msg:ReceivedNo>
  </ns0:Header>
  <ns0:Body>
    <CatalogObject.ТипыЦенНоменклатуры>
      <Ref>ec986086-5ba8-11e4-ae81-74f06d6aab21</Ref>
      <DeletionMark>false</DeletionMark>
      <Code>000000001</Code>
      <Description>Роздріб</Description>
    </CatalogObject.ТипыЦенНоменклатуры>
  </ns0:Body>
</ns0:Message>

So is there any way to preserve real prefix for namespaces?

@sanand0
Copy link
Owner

sanand0 commented Sep 13, 2016

@Charnelx I'm afraid the repository does not currently support namespaces. I'd be happy to review any pull requests that implement the functionality, though.

@Charnelx
Copy link
Author

@sanand0 I'm workig on this. My implementation almost ready, hope sone I'll make pull quest.

@sanand0
Copy link
Owner

sanand0 commented Nov 21, 2016

@Charnelx just checking if you had any luck with the namespace implementation?

@sanand0
Copy link
Owner

sanand0 commented Nov 21, 2016

Closing in favour of #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants