[MarkLogic Dev General] General Digest, Vol 152, Issue 18

Shiv Shankar shiv.shivshankar at gmail.com
Wed Feb 8 17:06:07 PST 2017


HI Sam,
Thanks for the reply.

-Shan.

On Wed, Feb 8, 2017 at 1:28 PM, <general-request at developer.marklogic.com>
wrote:

> Send General mailing list submissions to
>         general at developer.marklogic.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://developer.marklogic.com/mailman/listinfo/general
> or, via email, send a message with subject or body 'help' to
>         general-request at developer.marklogic.com
>
> You can reach the person managing the list at
>         general-owner at developer.marklogic.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of General digest..."
>
>
> Today's Topics:
>
>    1. Re: XML to JSON using MLCP (Sam Mefford)
>    2. Re: Is xdml:unquote appropriate for handling accent
>       characters? (Kari Cowan)
>    3. Re: Is xdml:unquote appropriate for handling accent
>       characters? (Indrajeet Verma)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 7 Feb 2017 22:53:37 +0000
> From: Sam Mefford <Sam.Mefford at marklogic.com>
> Subject: Re: [MarkLogic Dev General] XML to JSON using MLCP
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> Message-ID: <fc846ddf-98e6-954e-fee7-f739af3adc88 at marklogic.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Have you looked at using a transform?  Here's an example from the docs<
> https://docs.marklogic.com/guide/mlcp/import#id_17589> that converts from
> binary to XML, so I'm guessing you can convert from XML to JSON.
>
> Sam Mefford
> Senior Engineer
> MarkLogic Corporation
> sam.mefford at marklogic.com<mailto:sam.mefford at marklogic.com>
> Cell: +1 801 706 9731
> www.marklogic.com<http://www.marklogic.com>
>
> This e-mail and any accompanying attachments are confidential. The
> information is intended
> solely for the use of the individual to whom it is addressed. Any review,
> disclosure, copying,
> distribution, or use of this e-mail communication by others is strictly
> prohibited. If you
> are not the intended recipient, please notify us immediately by returning
> this message to
> the sender and delete all copies. Thank you for your cooperation.
>
>
> On 2/7/2017 3:16 PM, Shiv Shankar wrote:
> Hi,
> I am using nested xml and used -input_file_type aggregates since it is a
> nested XML. I see them inserting as XML documents. Is there way I can
> insert them as json documents using MLCP?
>
>
> Thanks
> Shan.
>
>
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com<mailto:General at developer.marklogic.com>
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170207/44ea05ff/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Wed, 8 Feb 2017 18:10:58 +0000
> From: Kari Cowan <KCowan at alm.com>
> Subject: Re: [MarkLogic Dev General] Is xdml:unquote appropriate for
>         handling accent characters?
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> Message-ID: <864F9079-BEE8-44BE-A3E5-C3D9A986B74E at alm.com>
> Content-Type: text/plain; charset="utf-8"
>
> I guess I can make it palatable with the function I added below ? then
> have them unfurl it on the front end.   When I pulled actual doc source ?
> even though ?Pok?mon? displayed in Qconsole, it was actually encoded as
> &egrave;
>
> declare function do:makeXMLsafe( $Str as xs:string ) {
>  let $Str:=fn:escape-html-uri($Str)
>  return $Str
> };
>
> >> changes ?Pok?mon? to ?Pok%C3%A9mon?
>
> Is there any better way to deal with it?
>
>
> From: <general-bounces at developer.marklogic.com> on behalf of Kari Cowan <
> KCowan at alm.com>
> Reply-To: MarkLogic <general at developer.marklogic.com>
> Date: Tuesday, February 7, 2017 at 2:34 PM
> To: MarkLogic <general at developer.marklogic.com>
> Subject: Re: [MarkLogic Dev General] Is xdml:unquote appropriate for
> handling accent characters?
>
> (note outlook stripped out the unknown character below, in the <title>
> node it was ?Pok?mon?
>
>
> From: Kari Cowan <KCowan at alm.com>
> Date: Tuesday, February 7, 2017 at 2:31 PM
> To: MarkLogic <general at developer.marklogic.com>
> Subject: Is xdml:unquote appropriate for handling accent characters?
>
> The doc contains a node with text including an accent grave, example:
>
> <HEADLINE>VOIR DIRE: Pok?mon Drive?</HEADLINE>
>
> I tried to handle it with:
> let $theTitle:=xdmp:unquote($theTitle, "", ("repair-full"))
>
> But I still get an output with an unknown character in xml
>
> <title>VOIR DIRE: Pokmon Drive?</title>
>
> >> XML Parsing Error: not well-formed
>
> Anyone have a tip they can share on how to handle it?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170208/f48ab7a6/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Wed, 8 Feb 2017 23:58:16 +0530
> From: Indrajeet Verma <indrajeet.verma at gmail.com>
> Subject: Re: [MarkLogic Dev General] Is xdml:unquote appropriate for
>         handling accent characters?
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> Message-ID:
>         <CAKwHAeiXtQC62wVCc+TBow9UuMo-Ae8vspWb1MsRSHktFBE5vg at mail.
> gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> See if this works for you.
>
> declare namespace xhtml = "http://www.w3.org/1999/xhtml";
> xdmp:tidy($Str, <options xmlns="xdmp:tidy"><output-
> xhtml>yes</output-xhtml>
>                   </options>)[2]/xhtml:html/xhtml:body/node()
>
> Regards,
> Indy
>
> On Wed, Feb 8, 2017 at 11:40 PM, Kari Cowan <KCowan at alm.com> wrote:
>
> > I guess I can make it palatable with the function I added below ? then
> > have them unfurl it on the front end.   When I pulled actual doc source ?
> > even though ?Pok?mon? displayed in Qconsole, it was actually encoded as
> > &egrave;
> >
> >
> >
> > declare function do:makeXMLsafe( $Str as xs:string ) {
> >
> >  let $Str:=fn:escape-html-uri($Str)
> >
> >  return $Str
> >
> > };
> >
> >
> >
> > >> changes ?Pok?mon? to ?Pok%C3%A9mon?
> >
> >
> >
> > Is there any better way to deal with it?
> >
> >
> >
> >
> >
> > *From: *<general-bounces at developer.marklogic.com> on behalf of Kari
> Cowan
> > <KCowan at alm.com>
> > *Reply-To: *MarkLogic <general at developer.marklogic.com>
> > *Date: *Tuesday, February 7, 2017 at 2:34 PM
> > *To: *MarkLogic <general at developer.marklogic.com>
> > *Subject: *Re: [MarkLogic Dev General] Is xdml:unquote appropriate for
> > handling accent characters?
> >
> >
> >
> > (note outlook stripped out the unknown character below, in the <title>
> > node it was ?Pok?mon?
> >
> >
> >
> >
> >
> > *From: *Kari Cowan <KCowan at alm.com>
> > *Date: *Tuesday, February 7, 2017 at 2:31 PM
> > *To: *MarkLogic <general at developer.marklogic.com>
> > *Subject: *Is xdml:unquote appropriate for handling accent characters?
> >
> >
> >
> > The doc contains a node with text including an accent grave, example:
> >
> >
> >
> > <HEADLINE>VOIR DIRE: Pok?mon Drive?</HEADLINE>
> >
> >
> >
> > I tried to handle it with:
> >
> > let $theTitle:=xdmp:unquote($theTitle, "", ("repair-full"))
> >
> >
> >
> > But I still get an output with an unknown character in xml
> >
> >
> >
> > <title>VOIR DIRE: Pokmon Drive?</title>
> >
> >
> >
> > >> XML Parsing Error: not well-formed
> >
> >
> >
> > Anyone have a tip they can share on how to handle it?
> >
> > _______________________________________________
> > General mailing list
> > General at developer.marklogic.com
> > Manage your subscription at:
> > http://developer.marklogic.com/mailman/listinfo/general
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://developer.marklogic.com/pipermail/general/
> attachments/20170208/743d7cfb/attachment.html
>
> ------------------------------
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 152, Issue 18
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20170208/7db63055/attachment.html 


More information about the General mailing list